Fix t5510-fetch's use of sed
authorShawn O. Pearce <spearce@spearce.org>
Mon, 12 Mar 2007 22:59:16 +0000 (18:59 -0400)
committerJunio C Hamano <junkio@cox.net>
Tue, 13 Mar 2007 00:37:30 +0000 (17:37 -0700)
POSIX says sed may add a trailing LF if there isn't already
one there.  We shouldn't rely on it not adding that LF, as
some systems (Mac OS X for example) will add it.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
t/t5510-fetch.sh

index ee3f397a9bf8d4a08c2f897f0ae094b8ea686344..426017e1d08aad5aa3a92f9473e02defc4b10aaf 100755 (executable)
@@ -134,7 +134,13 @@ test_expect_success 'bundle does not prerequisite objects' '
        git add file2 &&
        git commit -m add.file2 file2 &&
        git bundle create bundle3 -1 HEAD &&
-       sed "1,4d" < bundle3 > bundle.pack &&
+       (
+               while read x && test -n "$x"
+               do
+                       :;
+               done
+               cat
+       ) <bundle3 >bundle.pack &&
        git index-pack bundle.pack &&
        test 4 = $(git verify-pack -v bundle.pack | wc -l)
 '