print_sha1_ellipsis: introduce helper
Introduce a helper print_sha1_ellipsis() that pays attention to the GIT_PRINT_SHA1_ELLIPSIS environment variable, and prepare the tests to unconditionally set it for the test pieces that will be broken once the code stops showing the extra dots by default. The removal of these dots is merely a plan at this step and has not happened yet but soon will. Document GIT_PRINT_SHA1_ELLIPSIS. Signed-off-by: Ann T Ropea <bedhanger@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
f61d89e100
commit
a2cd709de3
@ -19,7 +19,7 @@ test_expect_success 'setup: create subprojects' '
|
||||
git update-index --add sub1 &&
|
||||
git add sub2 &&
|
||||
git commit -q -m "subprojects added" &&
|
||||
git diff-tree --abbrev=5 HEAD^ HEAD |cut -d" " -f-3,5- >current &&
|
||||
GIT_PRINT_SHA1_ELLIPSIS="yes" git diff-tree --abbrev=5 HEAD^ HEAD |cut -d" " -f-3,5- >current &&
|
||||
git branch save HEAD &&
|
||||
cat >expected <<-\EOF &&
|
||||
:000000 160000 00000... A sub1
|
||||
|
||||
Reference in New Issue
Block a user