aboutsummaryrefslogtreecommitdiff
path: root/t/t7003-filter-branch.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t7003-filter-branch.sh')
-rwxr-xr-xt/t7003-filter-branch.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh
index bc6e2ddb1..c79853d98 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