diff --git a/git-filter-branch.sh b/git-filter-branch.sh index 59cf023d5da068..efef732202fb10 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"