Commits

Anonymous committed 6c7f4ce

t/t4013: fix futzing with the version string.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Comments (0)

Files changed (1)

t/t4013-diff-various.sh

 +*+ [initial] Initial
 EOF
 
-V=`git version | sed -e 's/^git version //'`
+V=`git version | sed -e 's/^git version //' -e 's/\./\\./g'`
 while read cmd
 do
 	case "$cmd" in
 	test_expect_success "git $cmd" '
 		{
 			echo "\$ git $cmd"
-			git $cmd | sed -e "s/$V/g-i-t--v-e-r-s-i-o-n/"
+			git $cmd |
+			sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
+			    -e "s/^\\( *boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
 			echo "\$"
 		} >"$actual" &&
 		if test -f "$expect"