Fix t5510-fetch's use of sed
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>
Shawn O. Pearce committed
Mar 12, 2007 at 18:59 UTC
6016e35bc18e801a7bd855b1581da6c7fd755470
1 file changed
+7
-1
t/t5510-fetch.sh
+7
-1
@@ -134,7 +134,13 @@ test_expect_success 'bundle does not prerequisite objects' '
134
git add file2 &&
135
git commit -m add.file2 file2 &&
136
git bundle create bundle3 -1 HEAD &&
137
- sed "1,4d" < bundle3 > bundle.pack &&
137
+ (
138
+ while read x && test -n "$x"
139
+ do
140
+ :;
141
+ done
142
+ cat
143
+ ) <bundle3 >bundle.pack &&
144
git index-pack bundle.pack &&
145
test 4 = $(git verify-pack -v bundle.pack | wc -l)
146
'