1 # Copyright (C) 2014, Eric Wong <normalperson@yhbt.net> and all contributors
2 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
3 package PublicInbox::Config;
5 # returns key-value pairs of config directives in a hash
7 my ($class, $file) = @_;
9 local $ENV{GIT_CONFIG} = $file;
11 my @cfg = `git config -l`;
12 $? == 0 or die "git config -l failed: $?\n";
14 my %rv = map { split(/=/, $_, 2) } @cfg;