From: Brian Gernhardt <brian@gernhardtsoftware.com>
To: Git List <git@vger.kernel.org>
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [PATCH] t/annotate-tests: Use echo & cat instead of sed
Date: Thu, 5 May 2011 00:43:37 -0400 [thread overview]
Message-ID: <1304570617-17603-1-git-send-email-brian@gernhardtsoftware.com> (raw)
The use of the sed command "1i No robots allowed" caused the version
of sed in OS X to die with
sed: 1: "1i "No robots allowed"\n": command i expects \ followed by
text
Since this command was just trying to add a single line to the
beginning of the file, do the same with "echo > file.net && cat file
>> file.new"
Unbreaks t8001 and t8002 on OS X 10.6.7
---
t/annotate-tests.sh | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/t/annotate-tests.sh b/t/annotate-tests.sh
index abb1885..c56a77d 100644
--- a/t/annotate-tests.sh
+++ b/t/annotate-tests.sh
@@ -127,7 +127,8 @@ test_expect_success \
test_expect_success \
'an obfuscated email added' \
- 'sed -e "1i No robots allowed" < file > file.new &&
+ 'echo "No robots allowed" > file.new &&
+ cat file >> file.new &&
mv file.new file &&
GIT_AUTHOR_NAME="E" GIT_AUTHOR_EMAIL="E at test dot git" git commit -a -m "norobots"'
--
1.7.5.258.g6ba2f
next reply other threads:[~2011-05-05 4:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-05 4:43 Brian Gernhardt [this message]
2011-05-05 5:39 ` [PATCH] t/annotate-tests: Use echo & cat instead of sed Junio C Hamano
2011-05-05 7:43 ` Arjen Laarhoven
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=1304570617-17603-1-git-send-email-brian@gernhardtsoftware.com \
--to=brian@gernhardtsoftware.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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;
as well as URLs for NNTP newsgroup(s).