diff options
author | Csaba Henk <csaba@gluster.com> | 2010-08-27 20:44:56 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-08-27 16:47:01 -0700 |
commit | 7ec344d802970782036146e29ba2213e86d49fe1 (patch) | |
tree | f5599405b663d3b7f4bce082852df37215e65c98 /t | |
parent | 515cc0101943b766fde7aa894827119e332ec033 (diff) | |
download | git-7ec344d802970782036146e29ba2213e86d49fe1.tar.gz |
filter-branch: retire --remap-to-ancestor
We can be clever and know by ourselves when we need the behavior
implied by "--remap-to-ancestor". No need to encumber users by having
them exposed to it as a tunable. (Option kept for backward compatibility,
but it's now a no-op.)
Signed-off-by: Csaba Henk <csaba@gluster.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t7003-filter-branch.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh index 2c55801ee8..12aa63e7a1 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 && |