aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-09-15 12:39:32 -0700
committerJunio C Hamano <gitster@pobox.com>2010-09-15 12:39:32 -0700
commit43d268e9dd5a454abc2e6ae676202773ffd54537 (patch)
treee096b12d724bec7b963e29a92f660a4fb98bf594 /t
parentd42cb5804f9c52b88b6dfe709a659e31394ea2ae (diff)
parent7ec344d802970782036146e29ba2213e86d49fe1 (diff)
downloadgit-43d268e9dd5a454abc2e6ae676202773ffd54537.tar.gz
git-43d268e9dd5a454abc2e6ae676202773ffd54537.tar.xz
Merge branch 'ch/filter-branch-deprecate-remap-to-ancestor'
* ch/filter-branch-deprecate-remap-to-ancestor: filter-branch: retire --remap-to-ancestor
Diffstat (limited to 't')
-rwxr-xr-xt/t7003-filter-branch.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh
index 2c55801ee..12aa63e7a 100755
--- a/t/t7003-filter-branch.sh
+++ b/t/t7003-filter-branch.sh
@@ -307,6 +307,24 @@ test_expect_success '--remap-to-ancestor with filename filters' '
test $orig_invariant = $(git rev-parse invariant)
'
+test_expect_success 'automatic remapping to ancestor with filename filters' '
+ git checkout master &&
+ git reset --hard A &&
+ test_commit add-foo2 foo 1 &&
+ git branch moved-foo2 &&
+ test_commit add-bar2 bar a &&
+ git branch invariant2 &&
+ orig_invariant=$(git rev-parse invariant2) &&
+ git branch moved-bar2 &&
+ test_commit change-foo2 foo 2 &&
+ git filter-branch -f \
+ moved-foo2 moved-bar2 A..master \
+ -- -- foo &&
+ test $(git rev-parse moved-foo2) = $(git rev-parse moved-bar2) &&
+ test $(git rev-parse moved-foo2) = $(git rev-parse master^) &&
+ test $orig_invariant = $(git rev-parse invariant2)
+'
+
test_expect_success 'setup submodule' '
rm -fr ?* .git &&
git init &&