{"thread":{"id":"3313","subject":"[PATCH] avoid echo -e, there are systems where it does not work","startedAt":"2006-02-12T18:05:34Z","lastAt":"2006-02-12T18:05:34Z","messageCount":1,"participants":["Alex Riesen"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"15979","messageId":"20060212180534.GB3322@steel.home","threadId":"3313","inReplyTo":null,"subject":"[PATCH] avoid echo -e, there are systems where it does not work","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2006-02-12T18:05:34Z","receivedAt":"2006-02-12T18:05:34Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"FreeBSD 4.11 being one example: the built-in echo doesn't have -e,\nand the installed /bin/echo does not do \"-e\" as well.\n\"printf\" works, laking just \"\\e\" and \"\\xAB'.\n\n---\n\n git-tag.sh                         |    3 ++-\n t/t3001-ls-files-others-exclude.sh |    2 +-\n 2 files changed, 3 insertions(+), 2 deletions(-)\n\nb155e96dcb988b2533e8546666d0f045a36f594d\ndiff --git a/git-tag.sh b/git-tag.sh\nindex 6d0c973..c74e1b4 100755\n--- a/git-tag.sh\n+++ b/git-tag.sh\n@@ -85,7 +85,8 @@ if [ \"$annotate\" ]; then\n \texit 1\n     }\n \n-    ( echo -e \"object $object\\ntype $type\\ntag $name\\ntagger $tagger\\n\";\n+    ( printf 'object %s\\ntype %s\\ntag %s\\ntagger %s\\n\\n' \\\n+\t\"$object\" \"$type\" \"$name\" \"$tagger\";\n       cat \"$GIT_DIR\"/TAG_FINALMSG ) >\"$GIT_DIR\"/TAG_TMP\n     rm -f \"$GIT_DIR\"/TAG_TMP.asc \"$GIT_DIR\"/TAG_FINALMSG\n     if [ \"$signed\" ]; then\ndiff --git a/t/t3001-ls-files-others-exclude.sh b/t/t3001-ls-files-others-exclude.sh\nindex fde2bb2..6979b7c 100755\n--- a/t/t3001-ls-files-others-exclude.sh\n+++ b/t/t3001-ls-files-others-exclude.sh\n@@ -68,7 +68,7 @@ test_expect_success \\\n      diff -u expect output'\n \n # Test \\r\\n (MSDOS-like systems)\n-echo -ne '*.1\\r\\n/*.3\\r\\n!*.6\\r\\n' >.gitignore\n+printf '*.1\\r\\n/*.3\\r\\n!*.6\\r\\n' >.gitignore\n \n test_expect_success \\\n     'git-ls-files --others with \\r\\n line endings.' \\\n-- \n1.1.6.gd46b\n"}]}