[PATCH 13/16] filter-branch: don't use xargs -0

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jeff King
Date: Wednesday, March 12, 2008 - 2:41 pm

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>
---
 git-filter-branch.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index 59cf023..efef732 100755
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -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"
 
-- 
1.5.4.4.543.g30fdd.dirty

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 13/16] filter-branch: don't use xargs -0, Jeff King, (Wed Mar 12, 2:41 pm)