[PATCH 4/4] t4200: avoid passing a non-newline terminated file to sed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Some versions of sed exit non-zero if the file they are supplied is not
newline terminated.  Solaris's /usr/xpg4/bin/sed is one such sed.  So
rework this test to avoid doing so.
---
 t/t4200-rerere.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh
index b68ab11..48dbd8e 100755
--- a/t/t4200-rerere.sh
+++ b/t/t4200-rerere.sh
@@ -190,7 +190,7 @@ test_expect_success 'file2 added differently in two branches' '
 	git add file2 &&
 	git commit -m version2 &&
 	test_must_fail git merge fourth &&
-	sha1=$(sed -e "s/	.*//" .git/MERGE_RR) &&
+	sha1=$({ cat .git/MERGE_RR; echo; } | sed -e "s/	.*//") &&
 	rr=.git/rr-cache/$sha1 &&
 	echo Cello > file2 &&
 	git add file2 &&
-- 
1.6.2.4.24.gde59d2

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]