From: Jim Meyering Date: Tue, 18 Dec 2007 10:03:23 +0000 (+0100) Subject: git-filter-branch.sh: more portable tr usage: use \012, not \n. X-Git-Tag: v1.5.4-rc1~14 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e8a3f90994067a154fafcec9bbb18cf7865cd94c;p=git.git git-filter-branch.sh: more portable tr usage: use \012, not \n. I hesitate to suggest this, since GNU tr has accepted \n for 15 years, but there are supposedly a few crufty vendor-supplied versions of tr still in use. Also, all of the other uses of tr-with-newline in git use \012. Signed-off-by: Jim Meyering Signed-off-by: Junio C Hamano --- diff --git a/git-filter-branch.sh b/git-filter-branch.sh index 7f52b591a..ae29f47e4 100755 --- a/git-filter-branch.sh +++ b/git-filter-branch.sh @@ -290,7 +290,7 @@ while read commit parents; do eval "$filter_tree" < /dev/null || die "tree filter failed: $filter_tree" - git diff-index -r $commit | cut -f 2- | tr '\n' '\000' | \ + git diff-index -r $commit | cut -f 2- | tr '\012' '\000' | \ xargs -0 git update-index --add --replace --remove git ls-files -z --others | \ xargs -0 git update-index --add --replace --remove