From: Jeff King <peff@peff.net>
To: Derrick Stolee <stolee@gmail.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>,
Junio C Hamano <gitster@pobox.com>,
Jakub Narebski <jnareb@gmail.com>,
Jeff Hostetler <git@jeffhostetler.com>
Subject: Re: commit-graph: change in "best" merge-base when ambiguous
Date: Mon, 21 May 2018 17:54:43 -0400 [thread overview]
Message-ID: <20180521215443.GC16623@sigill.intra.peff.net> (raw)
In-Reply-To: <e78a115a-a5ea-3c0a-5437-51ba0bcc56e1@gmail.com>
On Mon, May 21, 2018 at 02:10:54PM -0400, Derrick Stolee wrote:
> In the Discussion section of the `git merge-base` docs [1], we have the
> following:
>
> When the history involves criss-cross merges, there can be more than one
> best common ancestor for two commits. For example, with this topology:
>
> ---1---o---A
> \ /
> X
> / \
> ---2---o---o---B
>
> both 1 and 2 are merge-bases of A and B. Neither one is better than the
> other (both are best merge bases). When the --all option is not given,
> it is unspecified which best one is output.
>
> This means our official documentation mentions that we do not have a
> concrete way to differentiate between these choices. This makes me think
> that this change in behavior is not a bug, but it _is_ a change in behavior.
> It's worth mentioning, but I don't think there is any value in making sure
> `git merge-base` returns the same output.
>
> Does anyone disagree? Is this something we should solidify so we always have
> a "definitive" merge-base?
Heh, I should have read your whole original message before responding,
not just the part that Elijah quoted.
Yes, I think this is clearly a case where all of the single merge-bases
we could show are equally good. And I don't think we should promise to
show a particular one, but I _do_ think it's friendly for us to have
deterministic tie-breakers (we certainly don't now).
-Peff
next prev parent reply other threads:[~2018-05-21 21:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-21 18:10 commit-graph: change in "best" merge-base when ambiguous Derrick Stolee
2018-05-21 18:33 ` Elijah Newren
2018-05-21 21:50 ` Jeff King
2018-05-21 22:28 ` Stefan Beller
2018-05-21 21:54 ` Jeff King [this message]
2018-05-21 22:25 ` Jacob Keller
2018-05-22 5:39 ` Michael Haggerty
2018-05-22 12:48 ` Derrick Stolee
2018-05-24 22:08 ` Jakub Narebski
2018-05-25 6:03 ` Michael Haggerty
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180521215443.GC16623@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@jeffhostetler.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jnareb@gmail.com \
--cc=stolee@gmail.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).