From: Junio C Hamano <gitster@pobox.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "Michał Kiedrowicz" <michal.kiedrowicz@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH] git-merge: Reduce heads before trying to merge them
Date: Tue, 17 Apr 2012 13:48:27 -0700 [thread overview]
Message-ID: <7vvckym6ec.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CA+55aFzLFA535CtjLJe1p62H=nunQ=vrL_mPYsYJB0e8U7mpdg@mail.gmail.com> (Linus Torvalds's message of "Tue, 17 Apr 2012 13:09:09 -0700")
Linus Torvalds <torvalds@linux-foundation.org> writes:
> 2012/4/17 Junio C Hamano <gitster@pobox.com>:
>>
>> If your current HEAD is an ancestor of one of the commit on that list, the
>> above does not omit it from the parent list of the resulting merge commit,
>> but if you performed the same merge while on one of the commit being
>> merged, your current HEAD will be excluded with reduce_heads(), which
>> would mean that you will end up recording a different history even though
>> a merge is supposed to be symmetrical.
>>
>> In other words, isn't any solution that calls reduce_heads() only on
>> remoteheads fundamentally wrong and merely papering over the problem?
>
> I think Michał's patch, together with my original one (but not the
> fixups later) is actually the right thing to do.
>
> Michał's patch fixes the "log shown multiple times" problem. It also
> turns a certain class of octopus merges into trivial common merges,
> which is good.
>
> So I'd suggest:
> - undo the two top commits from lt/octopus-simplify
> - apply Michał's patch on top of the remaining one commit
>
> It's not perfect, and I really think we could simplify things a bit
> more here, but I think the two commits together fix the problems in
> practice.
>
> Hmm?
I was cooking a fix on-and-off since yesterday evening, and sent it out a
few minutes ago. I think the spirit is almost the same as Michał's updated
patch, but it reduces the heads even earlier to catch cases where Michał's
updated patch may misdiagnose arity of the resulting merge due to its use
of remoteheads->next before the list is reduced (namely, the choice of the
default strategy based on how many we are merging).
next prev parent reply other threads:[~2012-04-17 20:48 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 ` [PATCH 0/4] merge: reduce set of parents consistently Junio C Hamano
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 [this message]
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=7vvckym6ec.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=michal.kiedrowicz@gmail.com \
--cc=torvalds@linux-foundation.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).