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
eval "$filter_tree" < /dev/null ||
die "tree filter failed: $filter_tree"
test_expect_success 'test that the file was renamed' '
- test d = $(git show HEAD:doh) &&
+ test d = "$(git show HEAD:doh --)" &&
+test_expect_success 'rewrite, renaming a specific directory' '
+ git-filter-branch -f --tree-filter "mv dir diroh || :" HEAD
+test_expect_success 'test that the directory was renamed' '
+ test dir/d = "$(git show HEAD:diroh/d --)" &&
+ test dir/d = "$(cat diroh/d)"