diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-07-16 22:29:06 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-07-16 22:29:06 +0400 |
commit | 6a5713b576c3e54388d58984b759e1215d425bcf (patch) | |
tree | 759ba6f8465e04fbd8267bc8c005df3a73fb22c6 /t | |
parent | 2e42338f806c2a79b691215ca3b238ac5beb57df (diff) | |
parent | 79bc4ef3686bc6795aa79a1d4aa6d3060a2cbd93 (diff) |
Merge branch 'cb/filter-branch-prune-empty-degenerate-merges'
"filter-branch" left an empty single-parent commit that results when
all parents of a merge commit gets mapped to the same commit, even
under "--prune-empty".
* cb/filter-branch-prune-empty-degenerate-merges:
filter-branch: eliminate duplicate mapped parents
Diffstat (limited to 't')
-rwxr-xr-x | t/t7003-filter-branch.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh index 9496736a89..66643e4bd7 100755 --- a/t/t7003-filter-branch.sh +++ b/t/t7003-filter-branch.sh @@ -308,6 +308,17 @@ test_expect_success 'Prune empty commits' ' test_cmp expect actual ' +test_expect_success 'prune empty collapsed merges' ' + test_config merge.ff false && + git rev-list HEAD >expect && + test_commit to_remove_2 && + git reset --hard HEAD^ && + test_merge non-ff to_remove_2 && + git filter-branch -f --index-filter "git update-index --remove to_remove_2.t" --prune-empty HEAD && + git rev-list HEAD >actual && + test_cmp expect actual +' + test_expect_success '--remap-to-ancestor with filename filters' ' git checkout master && git reset --hard A && |