git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/7] Fix t5510-fetch's use of sed

From
Shawn O. Pearce <spearce@spearce.org>
Date
Mar 12, 2007, 22:59 UTC
Message-ID
<20070312225916.GA16840@spearce.org>

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>
---
 t/t5510-fetch.sh |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index ee3f397..426017e 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -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)
 '
-- 
1.5.0.3.985.gcf0b4
Next: Johannes Schindelin
Message 1 of 2 in “Fix t5510-fetch's use of sed”
  1. 1/7 Fix t5510-fetch's use of sedShawn O. Pearce, Mar 12, 2007
  2. Johannes SchindelinMar 12, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.