From: Eric Wong Date: Fri, 1 Jan 2021 05:47:49 +0000 (-1200) Subject: import: unset GIT_CONFIG with `git config --global' X-Git-Tag: v1.7.0~1429 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=af2429033aef447f0149b207d87ffacfb057fc6d;p=public-inbox.git import: unset GIT_CONFIG with `git config --global' GIT_CONFIG is set by -convert, and user may have it set for other reasons. In either case, it conflicts with any any attempt to use `git config --global` so we have to unset it. This fixes t/multi-mid.t under TEST_RUN_MODE=0 --- diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm index 47a529ff..0aff0e9d 100644 --- a/lib/PublicInbox/Import.pm +++ b/lib/PublicInbox/Import.pm @@ -21,6 +21,7 @@ use POSIX qw(strftime); sub default_branch () { state $default_branch = do { + delete local $ENV{GIT_CONFIG}; my $r = popen_rd([qw(git config --global init.defaultBranch)]); chomp(my $h = <$r> // ''); $h eq '' ? 'refs/heads/master' : $h;