summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-11-21 07:46:14 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-11-21 07:46:14 (GMT)
commitaa437791d8b3d5a163777d1cabd1f299654ce712 (patch)
treec34b1714c6a80d0684e74bc96bdf47a263ea6ff4 /t
parent1973b23d284d0473795798d208f4b2fe09c0e659 (diff)
parentf2f3a6b802e3dae09a1c414cd8516ff2a546a527 (diff)
downloadgit-aa437791d8b3d5a163777d1cabd1f299654ce712.zip
git-aa437791d8b3d5a163777d1cabd1f299654ce712.tar.gz
git-aa437791d8b3d5a163777d1cabd1f299654ce712.tar.bz2
Merge branch 'tr/filter-branch'
* tr/filter-branch: filter-branch: nearest-ancestor rewriting outside subdir filter filter-branch: stop special-casing $filter_subdir argument
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 329c851..9503875 100755
--- a/t/t7003-filter-branch.sh
+++ b/t/t7003-filter-branch.sh
@@ -288,4 +288,22 @@ test_expect_success 'Prune empty commits' '
test_cmp expect actual
'
+test_expect_success '--remap-to-ancestor with filename filters' '
+ git checkout master &&
+ git reset --hard A &&
+ test_commit add-foo foo 1 &&
+ git branch moved-foo &&
+ test_commit add-bar bar a &&
+ git branch invariant &&
+ orig_invariant=$(git rev-parse invariant) &&
+ git branch moved-bar &&
+ test_commit change-foo foo 2 &&
+ git filter-branch -f --remap-to-ancestor \
+ moved-foo moved-bar A..master \
+ -- -- foo &&
+ test $(git rev-parse moved-foo) = $(git rev-parse moved-bar) &&
+ test $(git rev-parse moved-foo) = $(git rev-parse master^) &&
+ test $orig_invariant = $(git rev-parse invariant)
+'
+
test_done