Git development
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: [PATCH 1/7] Fix t5510-fetch's use of sed
Date: Mon, 12 Mar 2007 18:59:16 -0400	[thread overview]
Message-ID: <20070312225916.GA16840@spearce.org> (raw)

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

             reply	other threads:[~2007-03-12 22:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-12 22:59 Shawn O. Pearce [this message]
2007-03-12 23:06 ` [PATCH 1/7] Fix t5510-fetch's use of sed Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070312225916.GA16840@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox