Thread (7 messages) flat view 7 messages, 2 authors, 2016-06-15
DORMANTno replies

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:53:37

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help