{"thread":{"id":"11339","subject":"[PATCH] git-filter-branch.sh: more portable tr usage: use \\012, not \\n.","startedAt":"2007-12-18T10:03:23Z","lastAt":"2007-12-18T10:03:23Z","messageCount":1,"participants":["Jim Meyering"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"63583","messageId":"87y7bs2uc4.fsf@rho.meyering.net","threadId":"11339","inReplyTo":null,"subject":"[PATCH] git-filter-branch.sh: more portable tr usage: use \\012, not \\n.","fromName":"Jim Meyering","fromEmail":"jim@meyering.net","sentAt":"2007-12-18T10:03:23Z","receivedAt":"2007-12-18T10:03:23Z","isPatch":true,"sender":{"key":"jim@meyering.net","avatar":"https://avatars.githubusercontent.com/u/710630?v=4"},"body":"\nI hesitate to suggest this, since GNU tr has accepted \\n for 15 years,\nbut there are supposedly a few crufty vendor-supplied versions of tr still\nin use.  Also, all of the other uses of tr-with-newline in git use \\012.\n\nSigned-off-by: Jim Meyering <meyering@redhat.com>\n---\n git-filter-branch.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-filter-branch.sh b/git-filter-branch.sh\nindex 3bb2f67..ee9e1b3 100755\n--- a/git-filter-branch.sh\n+++ b/git-filter-branch.sh\n@@ -290,7 +290,7 @@ while read commit parents; do\n \t\teval \"$filter_tree\" < /dev/null ||\n \t\t\tdie \"tree filter failed: $filter_tree\"\n\n-\t\tgit diff-index -r $commit | cut -f 2- | tr '\\n' '\\000' | \\\n+\t\tgit diff-index -r $commit | cut -f 2- | tr '\\012' '\\000' | \\\n \t\t\txargs -0 git update-index --add --replace --remove\n \t\tgit ls-files -z --others | \\\n \t\t\txargs -0 git update-index --add --replace --remove\n--\n1.5.4.rc0.53.gdfcd\n"}]}