diff options
Diffstat (limited to 't')
-rwxr-xr-x | t/t7003-filter-branch.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh index bc6e2ddb19..c79853d986 100755 --- a/t/t7003-filter-branch.sh +++ b/t/t7003-filter-branch.sh @@ -159,4 +159,14 @@ test_expect_success 'barf on invalid name' ' ! git filter-branch -f HEAD^ ' +test_expect_success '"map" works in commit filter' ' + git filter-branch -f --commit-filter "\ + parent=\$(git rev-parse \$GIT_COMMIT^) && + mapped=\$(map \$parent) && + actual=\$(echo \"\$@\" | sed \"s/^.*-p //\") && + test \$mapped = \$actual && + git commit-tree \"\$@\";" master~2..master && + git rev-parse --verify master +' + test_done |