]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t1510-repo-setup.sh
tests: use "env" to run commands with temporary env-var settings
[thirdparty/git.git] / t / t1510-repo-setup.sh
index cf2ee7885ac9c2172deccc27dfb994546593e842..e1b2a99f105f8700e72974428c126ea049247194 100755 (executable)
@@ -777,9 +777,7 @@ test_expect_success '#30: core.worktree and core.bare conflict (gitfile version)
        setup_repo 30 "$here/30" gitfile true &&
        (
                cd 30 &&
-               GIT_DIR=.git &&
-               export GIT_DIR &&
-               test_must_fail git symbolic-ref HEAD 2>result
+               test_must_fail env GIT_DIR=.git git symbolic-ref HEAD 2>result
        ) &&
        grep "core.bare and core.worktree" 30/result
 '