Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
t/annotate-tests.sh: avoid passing a non-newline terminated file to sed
author
Brandon Casey
<casey@nrlssc.navy.mil>
Wed, 6 May 2009 18:29:16 +0000
(13:29 -0500)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 6 May 2009 18:50:44 +0000
(11:50 -0700)
Some versions of sed exit non-zero if the file they are supplied is not
newline terminated. Solaris's /usr/xpg4/bin/sed is one such sed. So
rework this test to avoid doing so.
This affects tests t8001-annotate.sh and t8002-blame.sh.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/annotate-tests.sh
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
325fb15
)
diff --git
a/t/annotate-tests.sh
b/t/annotate-tests.sh
index cacb273afff1fbddf152bb440451fa141589cf33..396b9653a3ad80490cf360c86a910edff58862a2 100644
(file)
--- a/
t/annotate-tests.sh
+++ b/
t/annotate-tests.sh
@@
-114,7
+114,10
@@
test_expect_success \
test_expect_success \
'some edit' \
'mv file file.orig &&
- sed -e "s/^3A/99/" -e "/^1A/d" -e "/^incomplete/d" < file.orig > file &&
+ {
+ cat file.orig &&
+ echo
+ } | sed -e "s/^3A/99/" -e "/^1A/d" -e "/^incomplete/d" > file &&
echo "incomplete" | tr -d "\\012" >>file &&
GIT_AUTHOR_NAME="D" git commit -a -m "edit"'