@matheusbsbs / matheus-bagliano / commits / 0dbc4e89bb
Fork 0

avoid echo -e, there are systems where it does not work

FreeBSD 4.11 being one example: the built-in echo doesn't have -e, and the installed /bin/echo does not do "-e" as well. "printf" works, laking just "\e" and "\xAB'. Signed-off-by: Junio C Hamano <junkio@cox.net>

Alex Riesen committed Feb 12, 2006 at 19:05 UTC 0dbc4e89bb3ddaaa4230f91d5f59b08f3d33e91b
2 files changed +3 -2
git-tag.sh
+2 -1
@@ -85,7 +85,8 @@ if [ "$annotate" ]; then
85 exit 1
86 }
87
88 - ( echo -e "object $object\ntype $type\ntag $name\ntagger $tagger\n";
88 + ( printf 'object %s\ntype %s\ntag %s\ntagger %s\n\n' \
89 + "$object" "$type" "$name" "$tagger";
90 cat "$GIT_DIR"/TAG_FINALMSG ) >"$GIT_DIR"/TAG_TMP
91 rm -f "$GIT_DIR"/TAG_TMP.asc "$GIT_DIR"/TAG_FINALMSG
92 if [ "$signed" ]; then
t/t3001-ls-files-others-exclude.sh
+1 -1
@@ -68,7 +68,7 @@ test_expect_success \
68 diff -u expect output'
69
70 # Test \r\n (MSDOS-like systems)
71 -echo -ne '*.1\r\n/*.3\r\n!*.6\r\n' >.gitignore
71 +printf '*.1\r\n/*.3\r\n!*.6\r\n' >.gitignore
72
73 test_expect_success \
74 'git-ls-files --others with \r\n line endings.' \