diff --git a/git-filter-branch.sh b/git-filter-branch.sh index 22b6ed4a784192bb865dff83731255b1979a1e39..ea59015baa2507fdc8fe77d1c77ebdb2d5db2fa7 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 clean -q -f -x + git clean -d -q -f -x eval "$filter_tree" < /dev/null || die "tree filter failed: $filter_tree" diff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh index 53b5ce605e424172fc3fb40624d8abcabf67b631..efd658adb6d6327863f430b10ab65aa3f112f996 100755 --- a/t/t7003-filter-branch.sh +++ b/t/t7003-filter-branch.sh @@ -53,7 +53,7 @@ test_expect_success 'rewrite, renaming a specific directory' ' git-filter-branch -f --tree-filter "mv dir diroh || :" HEAD ' -test_expect_failure 'test that the directory was renamed' ' +test_expect_success 'test that the directory was renamed' ' test dir/d = "$(git show HEAD:diroh/d --)" && ! test -d dir && test -d diroh &&