From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id C70CE1FA13 for ; Fri, 1 Jan 2021 05:47:50 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 3/4] import: unset GIT_CONFIG with `git config --global' Date: Thu, 31 Dec 2020 17:47:49 -1200 Message-Id: <20210101054750.6771-4-e@80x24.org> In-Reply-To: <20210101054750.6771-1-e@80x24.org> References: <20210101054750.6771-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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 --- lib/PublicInbox/Import.pm | 1 + 1 file changed, 1 insertion(+) 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;