filter-branch: don't use xargs -0
authorJeff King <peff@peff.net>
Wed, 12 Mar 2008 21:41:02 +0000 (17:41 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 13 Mar 2008 07:57:53 +0000 (00:57 -0700)
Some versions of xargs don't understand "-0"; fortunately in
this case we can get the same effect by using "git clean".

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-filter-branch.sh
index 59cf023d5da068eaad4a1cef661015a42c34e703..efef732202fb10b632b36c5080bcec2302217a7d 100755 (executable)
@@ -281,7 +281,7 @@ while read commit parents; do
                        die "Could not checkout the index"
                # files that $commit removed are now still in the working tree;
                # remove them, else they would be added again
-               git ls-files -z --others | xargs -0 rm -f
+               git clean -q -f -x
                eval "$filter_tree" < /dev/null ||
                        die "tree filter failed: $filter_tree"