Read gitconfig and return a Hash of Hash.
Perl 6 Makefile
Switch branches/tags
Nothing to show
Latest commit 66b6c0c Aug 17, 2017 @gfldex bump version


Build Status

Read gitconfig and return a Hash of Hash.


use Git::Config;

my $git-user = git-config<user><name>;
my $remote-repo = git-config('.git/config'){'remote "origin"'}<url>;

for git-config().seach-path -> {
    say "looking for a git config in " ~ .Str;

say "found a git config at " ~ git-config().path;


sub git-config(IO::Path $file? --> Hash)

The returned Hash got an anonymous role mixed in providing the method path pointing to the location of the git config file that was read. The method search-path that is returning a list of paths, containing the paths a git config file was searched in.


grammar Config