summaryrefslogtreecommitdiff
path: root/t/t1302-repo-version.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2014-03-20 23:17:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-03-21 21:26:55 (GMT)
commitf7e87141011fc55f8267ea76d3cc016ee87f9053 (patch)
treee6127793ab08403ad771f7e7e58a775f2f434d55 /t/t1302-repo-version.sh
parent551a3e60d1cb9dca37a3a789cf1a4b94074ce6c5 (diff)
downloadgit-f7e87141011fc55f8267ea76d3cc016ee87f9053.zip
git-f7e87141011fc55f8267ea76d3cc016ee87f9053.tar.gz
git-f7e87141011fc55f8267ea76d3cc016ee87f9053.tar.bz2
t: prefer "git config --file" to GIT_CONFIG
Doing: GIT_CONFIG=foo git config ... is equivalent to: git config --file=foo ... The latter is easier to read and slightly less error-prone, because of issues with one-shot variables and shell functions (e.g., you cannot use the former with test_must_fail). Note that we explicitly leave one case in t1300 which checks the same operation on both GIT_CONFIG and "git config --file". They are equivalent in the code these days, but this will make sure it remains so. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1302-repo-version.sh')
-rwxr-xr-xt/t1302-repo-version.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t1302-repo-version.sh b/t/t1302-repo-version.sh
index 0e47662..0d9388a 100755
--- a/t/t1302-repo-version.sh
+++ b/t/t1302-repo-version.sh
@@ -19,7 +19,7 @@ test_expect_success 'setup' '
test_create_repo "test" &&
test_create_repo "test2" &&
- GIT_CONFIG=test2/.git/config git config core.repositoryformatversion 99
+ git config --file=test2/.git/config core.repositoryformatversion 99
'
test_expect_success 'gitdir selection on normal repos' '