]> git.ipfire.org Git - thirdparty/git.git/commit - t/t6028-merge-up-to-date.sh
builtin/merge.c: reduce parents early
authorJunio C Hamano <gitster@pobox.com>
Tue, 17 Apr 2012 19:22:26 +0000 (12:22 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 18 Apr 2012 00:15:05 +0000 (17:15 -0700)
commite78cbf8cbb61edfbdef5d33262f9b8cf02a3afca
tree4cf4a58f041d62e22f3876bd4c0c536257f4a331
parentb5d887f90692515a6e9c99e7683533d12df3ade2
builtin/merge.c: reduce parents early

Instead of waiting until we record the parents of resulting merge, reduce
redundant parents (including our HEAD) immediately after reading them.

The change to t7602 illustrates the essence of the effect of this change.
The octopus merge strategy used to be fed with redundant commits only to
discard them as "up-to-date", but we no longer feed such redundant commits
to it and the affected test degenerates to a regular two-head merge.

And obviously the known-to-be-broken test in t6028 is now fixed.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/merge.c
t/t6028-merge-up-to-date.sh
t/t7602-merge-octopus-many.sh
t/t7603-merge-reduce-heads.sh