]> Sergey Matveev's repositories - public-inbox.git/commitdiff
t/config.t: remove GIT_DIR usage in test
authorEric Wong <e@80x24.org>
Mon, 23 May 2016 01:14:32 +0000 (01:14 +0000)
committerEric Wong <e@80x24.org>
Mon, 23 May 2016 01:15:44 +0000 (01:15 +0000)
Followup-to: commit 24e0219f364ed402f9136227756e0f196dc651aa
("remove GIT_DIR env usage in favor of --git-dir")

t/config.t

index 76f6065d0e71bc302e641d0b12040a21d41cbc11..78971a2f75726a78096883c72bb5e439836e2f4e 100644 (file)
@@ -9,10 +9,8 @@ my $tmpdir = tempdir('pi-config-XXXXXX', TMPDIR => 1, CLEANUP => 1);
 
 {
        is(system(qw(git init -q --bare), $tmpdir), 0, "git init successful");
-       {
-               local $ENV{GIT_DIR} = $tmpdir;
-               is(system(qw(git config foo.bar hihi)), 0, "set config");
-       }
+       my @cmd = ('git', "--git-dir=$tmpdir", qw(config foo.bar hihi));
+       is(system(@cmd), 0, "set config");
 
        my $tmp = PublicInbox::Config->new("$tmpdir/config");