summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fb95220)
raw | patch | inline | side by side (parent: fb95220)
author | Jason Riedy <ejr@EECS.Berkeley.EDU> | |
Tue, 16 Jan 2007 01:31:29 +0000 (17:31 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 16 Jan 2007 06:23:21 +0000 (22:23 -0800) |
Not all echos know -n. This was causing a test failure in
t5401-update-hooks.sh, but not t3800-mktag.sh for some reason.
Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
t5401-update-hooks.sh, but not t3800-mktag.sh for some reason.
Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
index 25901e2b3bc87279d4b2911adc0a5e8d97ce6e38..b996996bfbff614b3bf2f30c04a05c7d0caf45ec 100644 (file)
{
cd "$GIT_DIR"/remotes
ls | while read f; do
- name=$(echo -n "$f" | tr -c "A-Za-z0-9" ".")
+ name=$(printf "$f" | tr -c "A-Za-z0-9" ".")
sed -n \
-e "s/^URL: \(.*\)$/remote.$name.url \1 ./p" \
-e "s/^Pull: \(.*\)$/remote.$name.fetch \1 ^$ /p" \
diff --git a/git-quiltimport.sh b/git-quiltimport.sh
index 10135da3ac04e3175fa45ca26b5ea31605a47284..2ae1f20c2e90a34ee9c1c37ffa239ff9fa0798c8 100755 (executable)
--- a/git-quiltimport.sh
+++ b/git-quiltimport.sh
echo "No author found in $patch_name" >&2;
echo "---"
cat $tmp_msg
- echo -n "Author: ";
+ printf "Author: ";
read patch_author
echo "$patch_author"
diff --git a/git-reset.sh b/git-reset.sh
index 91c7e6e664eeac0a130044d3d026ccbbfa00f3b3..bf2a0581fe0b0dd2c393dce6f31c8e9ad9f352c9 100755 (executable)
--- a/git-reset.sh
+++ b/git-reset.sh
case "$reset_type" in
--hard )
test $update_ref_status = 0 && {
- echo -n "HEAD is now at "
+ printf "HEAD is now at "
GIT_PAGER= git log --max-count=1 --pretty=oneline \
--abbrev-commit HEAD
}
diff --git a/t/t3800-mktag.sh b/t/t3800-mktag.sh
index 5b23b7769d8d178482bb7a08e27efd9e02d425a2..ede4d42495bd5fd4f0ec7f03c41505864e5bb91e 100755 (executable)
--- a/t/t3800-mktag.sh
+++ b/t/t3800-mktag.sh
# 5. type line eol check
echo "object 779e9b33986b1c2670fff52c5067603117b3e895" >tag.sig
-echo -n "type tagsssssssssssssssssssssssssssssss" >>tag.sig
+printf "type tagsssssssssssssssssssssssssssssss" >>tag.sig
cat >expect.pat <<EOF
^error: char48: .*"[\]n"$
index cd8cee6ae8dbb2fb03413f084dea4d597adfffec..0514056ca6e8e54101b378cafd76b22a81df0ff5 100755 (executable)
--- a/t/t5401-update-hooks.sh
+++ b/t/t5401-update-hooks.sh
cat >victim/.git/hooks/update <<'EOF'
#!/bin/sh
echo "$@" >$GIT_DIR/update.args
-read x; echo -n "$x" >$GIT_DIR/update.stdin
+read x; printf "$x" >$GIT_DIR/update.stdin
echo STDOUT update
echo STDERR update >&2
EOF
cat >victim/.git/hooks/post-update <<'EOF'
#!/bin/sh
echo "$@" >$GIT_DIR/post-update.args
-read x; echo -n "$x" >$GIT_DIR/post-update.stdin
+read x; printf "$x" >$GIT_DIR/post-update.stdin
echo STDOUT post-update
echo STDERR post-update >&2
EOF
diff --git a/t/t6023-merge-file.sh b/t/t6023-merge-file.sh
index 1c21d8c986fba2c287ffab0b883b65a14cb5401f..f3cd3dba4df6ac1582956a1f9d17a9818aeb694d 100644 (file)
--- a/t/t6023-merge-file.sh
+++ b/t/t6023-merge-file.sh
animam meam convertit,
deduxit me super semitas jusitiae,
EOF
-echo -n "propter nomen suum." >> new4.txt
+printf "propter nomen suum." >> new4.txt
cp new1.txt test.txt
test_expect_success "merge without conflict" \