summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2015-12-01 22:21:17 (GMT)
committerJeff King <peff@peff.net>2015-12-01 22:21:17 (GMT)
commit978b5760a11846ee7e2b928aca629a065a9d876d (patch)
treebeb3e3a37ea7b596f184b18f108e0df6f0fc50bb /t
parent2cc36407df4eb919c4ad3da0561d1bbdb9e0c0c4 (diff)
parent4d2a3646d1f0285ce072cdfe34a7df64710f9357 (diff)
downloadgit-978b5760a11846ee7e2b928aca629a065a9d876d.zip
git-978b5760a11846ee7e2b928aca629a065a9d876d.tar.gz
git-978b5760a11846ee7e2b928aca629a065a9d876d.tar.bz2
Merge branch 'sg/filter-branch-dwim-ambiguity' into maint
Fix for a corner case in filter-branch. * sg/filter-branch-dwim-ambiguity: filter-branch: deal with object name vs. pathname ambiguity in tree-filter
Diffstat (limited to 't')
-rwxr-xr-xt/t7003-filter-branch.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh
index 377c648..869e0bf 100755
--- a/t/t7003-filter-branch.sh
+++ b/t/t7003-filter-branch.sh
@@ -418,4 +418,11 @@ test_expect_success 'filter commit message without trailing newline' '
test_cmp expect actual
'
+test_expect_success 'tree-filter deals with object name vs pathname ambiguity' '
+ test_when_finished "git reset --hard original" &&
+ ambiguous=$(git rev-list -1 HEAD) &&
+ git filter-branch --tree-filter "mv file.t $ambiguous" HEAD^.. &&
+ git show HEAD:$ambiguous
+'
+
test_done