filter-branch: don't use xargs -0
authorJeff King <[email protected]>
Wed, 12 Mar 2008 21:41:02 +0000 (12 17:41 -0400)
committerJeff King <[email protected]>
Thu, 13 Mar 2008 12:19:01 +0000 (13 08:19 -0400)
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 <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
git-filter-branch.sh

index 59cf023..efef732 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"