summaryrefslogtreecommitdiff
path: root/t/t3040-subprojects-basic.sh
diff options
context:
space:
mode:
authorAnn T Ropea <bedhanger@gmx.de>2017-11-13 23:36:54 +0100
committerJunio C Hamano <gitster@pobox.com>2017-11-14 15:44:40 +0900
commit1e29f6077da6e192c3ddc0cea1d4c64e7ef39e6f (patch)
treee81d27e7221e7b37b640208a9c90b19a1aa6d0d1 /t/t3040-subprojects-basic.sh
parent61f8c9f2cd46535a657d41ca31b1bf7e43e522be (diff)
downloadgit-ar/ellipsis.tar.gz
Testing: provide tests requiring them with ellipses after SHA-1 valuesar/ellipsis
Where needed, we arrange for invocations of Git as if "-c core.printsha1ellipsis=true" had been specified on the command-line. This furnishes ellipses in the output which then matches what is expected. Signed-off-by: Ann T Ropea <bedhanger@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3040-subprojects-basic.sh')
-rwxr-xr-xt/t3040-subprojects-basic.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t3040-subprojects-basic.sh b/t/t3040-subprojects-basic.sh
index 0a4ff6d824..63b85bfdd4 100755
--- a/t/t3040-subprojects-basic.sh
+++ b/t/t3040-subprojects-basic.sh
@@ -3,6 +3,18 @@
test_description='Basic subproject functionality'
. ./test-lib.sh
+# Some of the tests expect an ellipsis after the (abbreviated)
+# SHA-1 value. The code below results in Git being called with
+# "-c core.printsha1ellipsis=true" which satisfies those tests.
+do_print_sha1_ellipsis="'core.printsha1ellipsis=true'"
+if test -z "${GIT_CONFIG_PARAMETERS}"
+then
+ GIT_CONFIG_PARAMETERS="${do_print_sha1_ellipsis}"
+else
+ GIT_CONFIG_PARAMETERS="${GIT_CONFIG_PARAMETERS} ${do_print_sha1_ellipsis}"
+fi
+export GIT_CONFIG_PARAMETERS
+
test_expect_success 'setup: create superproject' '
: >Makefile &&
git add Makefile &&