summaryrefslogtreecommitdiff
path: root/git-filter-branch.sh
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2007-12-18 10:03:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-12-18 20:00:26 (GMT)
commite8a3f90994067a154fafcec9bbb18cf7865cd94c (patch)
tree50a2fc3d3ab052775477557b3a8e6fca6d29904b /git-filter-branch.sh
parent91c3aced4c9b961e162f9acd706f4b03a85aed2c (diff)
downloadgit-e8a3f90994067a154fafcec9bbb18cf7865cd94c.zip
git-e8a3f90994067a154fafcec9bbb18cf7865cd94c.tar.gz
git-e8a3f90994067a154fafcec9bbb18cf7865cd94c.tar.bz2
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 <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-filter-branch.sh')
-rwxr-xr-xgit-filter-branch.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index 7f52b59..ae29f47 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