summaryrefslogtreecommitdiff
path: root/t/t1300-repo-config.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-03-31 16:30:40 -0700
committerJunio C Hamano <gitster@pobox.com>2014-03-31 16:30:40 -0700
commitfa73d354689aa577d564b03d22f87c34b6288a78 (patch)
treed9b0fafb6bd690397265aae2d549489546dfe004 /t/t1300-repo-config.sh
parent96e67c86f817b4fbd492b12f57dae4bd821571ba (diff)
parent512477b175288a429aaf4071dc9fe94f17f0e4ee (diff)
downloadgit-fa73d354689aa577d564b03d22f87c34b6288a78.tar.gz
Merge branch 'dt/tests-with-env-not-subshell'
* dt/tests-with-env-not-subshell: tests: use "env" to run commands with temporary env-var settings
Diffstat (limited to 't/t1300-repo-config.sh')
-rwxr-xr-xt/t1300-repo-config.sh17
1 files changed, 4 insertions, 13 deletions
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index c9c426c273..3e3f77b59b 100755
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
@@ -974,24 +974,15 @@ test_expect_success SYMLINKS 'symlinked configuration' '
'
test_expect_success 'nonexistent configuration' '
- (
- GIT_CONFIG=doesnotexist &&
- export GIT_CONFIG &&
- test_must_fail git config --list &&
- test_must_fail git config test.xyzzy
- )
+ test_must_fail env GIT_CONFIG=doesnotexist git config --list &&
+ test_must_fail env GIT_CONFIG=doesnotexist git config test.xyzzy
'
test_expect_success SYMLINKS 'symlink to nonexistent configuration' '
ln -s doesnotexist linktonada &&
ln -s linktonada linktolinktonada &&
- (
- GIT_CONFIG=linktonada &&
- export GIT_CONFIG &&
- test_must_fail git config --list &&
- GIT_CONFIG=linktolinktonada &&
- test_must_fail git config --list
- )
+ test_must_fail env GIT_CONFIG=linktonada git config --list &&
+ test_must_fail env GIT_CONFIG=linktolinktonada git config --list
'
test_expect_success 'check split_cmdline return' "