From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: [PATCH 0/4] merge: reduce set of parents consistently
Date: Tue, 17 Apr 2012 13:34:42 -0700 [thread overview]
Message-ID: <1334694886-27756-1-git-send-email-gitster@pobox.com> (raw)
In-Reply-To: <CA+55aFyZYnAxJc8YT=GEnq-fdXbHCXyx937KNBngn69Zuxmcgg@mail.gmail.com>
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
next prev parent reply other threads:[~2012-04-17 20:34 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-16 6:26 What's cooking in git.git (Apr 2012, #05; Thu, 12) Michal Kiedrowicz
2012-04-16 14:57 ` Linus Torvalds
2012-04-16 17:29 ` Junio C Hamano
2012-04-16 17:50 ` Linus Torvalds
2012-04-16 22:03 ` Junio C Hamano
2012-04-17 20:34 ` Junio C Hamano [this message]
2012-04-17 20:34 ` [PATCH 1/4] git-merge: test octopus with redundant parents Junio C Hamano
2012-04-17 20:34 ` [PATCH 2/4] builtin/merge.c: remove "remoteheads" global variable Junio C Hamano
2012-04-17 20:34 ` [PATCH 3/4] builtin/merge.c: collect other parents early Junio C Hamano
2012-04-17 20:34 ` [PATCH 4/4] builtin/merge.c: reduce " Junio C Hamano
2012-04-16 17:36 ` What's cooking in git.git (Apr 2012, #05; Thu, 12) Junio C Hamano
2012-04-16 18:02 ` Linus Torvalds
2012-04-16 18:33 ` Linus Torvalds
2012-04-16 21:32 ` Michał Kiedrowicz
2012-04-17 1:22 ` Linus Torvalds
2012-04-17 18:25 ` [PATCH] git-merge: Reduce heads before trying to merge them Michał Kiedrowicz
2012-04-17 18:52 ` Junio C Hamano
2012-04-17 20:09 ` Linus Torvalds
2012-04-17 20:48 ` Junio C Hamano
2012-04-18 18:14 ` Michał Kiedrowicz
2012-04-18 20:20 ` Junio C Hamano
2012-04-19 5:19 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1334694886-27756-1-git-send-email-gitster@pobox.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).