From: Johan Herland Date: Thu, 20 Aug 2009 09:24:54 +0000 (+0200) Subject: t7407: Use 'rev-parse --short' rather than bash's substring expansion notation X-Git-Tag: v1.6.5-rc0~32^2~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e3ae4a8613151c93ffce78c674ac91c1ee34eef6;p=git.git t7407: Use 'rev-parse --short' rather than bash's substring expansion notation The substring expansion notation is a bashism that we have not so far adopted. Use 'git rev-parse --short' instead, as this also handles the case where the unique abbreviation is longer than 7 characters. Also fix the typo; the object name for submodule #2 was copied from submodule #1's by mistake. Suggested-by: Brandon Casey Signed-off-by: Johan Herland Signed-off-by: Junio C Hamano --- diff --git a/t/t7407-submodule-foreach.sh b/t/t7407-submodule-foreach.sh index de1730d63..519db49ea 100755 --- a/t/t7407-submodule-foreach.sh +++ b/t/t7407-submodule-foreach.sh @@ -201,14 +201,16 @@ submodulesha1=$(cd clone3/nested1/nested2/nested3/submodule && git rev-parse HEA sub1sha1=$(cd clone3/sub1 && git rev-parse HEAD) sub2sha1=$(cd clone3/sub2 && git rev-parse HEAD) sub3sha1=$(cd clone3/sub3 && git rev-parse HEAD) +sub1sha1_short=$(cd clone3/sub1 && git rev-parse --short HEAD) +sub2sha1_short=$(cd clone3/sub2 && git rev-parse --short HEAD) cat > expect <