[PATCH 0/4] merge: reduce set of parents consistently

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



So this is my attempt to address "Eek, why does your Octopus record many
irrelevant parents?!?!?!" issue from Linus and Michał (but without reusing
any code from them, except for the initial test).

In the original code, the variable remoteheads held the list of parents
read from the command line, and it was used throughout the code to see how
many parents the resulting merge will have (used to see if we use twohead
or octopus strategy), except that right before we come up with the set of
parents to record in the resulting merge commit, we discarded redundant
ones.

The updated code instead reduces the parents right after we read them.
This even detects the case where our HEAD is an ancestor of one of the
commits being merged, in which case HEAD will not be recorded unless we
are deliberately recording a fast-forward case as a real merge.

Junio C Hamano (3):
  builtin/merge.c: remove "remoteheads" global variable
  builtin/merge.c: collect other parents early
  builtin/merge.c: reduce parents early

Michał Kiedrowicz (1):
  git-merge: test octopus with redundant parents

 builtin/merge.c               |  142 +++++++++++++++++++++++++----------------
 t/t6028-merge-up-to-date.sh   |   17 ++++-
 t/t7602-merge-octopus-many.sh |   10 ++-
 3 files changed, 108 insertions(+), 61 deletions(-)

-- 
1.7.10.332.g1863c

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]