about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2020-12-31 17:47:49 -1200
committerEric Wong <e@80x24.org>2021-01-02 09:15:09 +0000
commitaf2429033aef447f0149b207d87ffacfb057fc6d (patch)
treefc8a7374d89364c419dcc08b855c9f37acdc7a96
parentcc1660fd3bb16f684062d5c63ae4320d2c7f939c (diff)
downloadpublic-inbox-af2429033aef447f0149b207d87ffacfb057fc6d.tar.gz
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
-rw-r--r--lib/PublicInbox/Import.pm1
1 files changed, 1 insertions, 0 deletions
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;