git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Michal Suchánek" <msuchanek@suse.de>
To: Eugeniu Rosca <erosca@de.adit-jv.com>
Cc: "Junio C Hamano" <gitster@pobox.com>,
	git@vger.kernel.org, "Jeff King" <peff@peff.net>,
	"Ævar Arnfjörð" <avarab@gmail.com>,
	"SZEDER Gábor" <szeder.dev@gmail.com>,
	"Eugeniu Rosca" <roscaeugeniu@gmail.com>
Subject: Re: Assessing about commit order in upstream Linux
Date: Thu, 28 May 2020 22:25:38 +0200	[thread overview]
Message-ID: <20200528202538.GK25173@kitsune.suse.cz> (raw)
In-Reply-To: <20200528181226.GB9275@lxhi-065.adit-jv.com>

On Thu, May 28, 2020 at 08:12:26PM +0200, Eugeniu Rosca wrote:
> Hi Michal,
> 
> On Tue, May 26, 2020 at 07:14:43PM +0200, Michal Suchánek wrote:
> > On Tue, May 26, 2020 at 08:21:25AM -0700, Junio C Hamano wrote:
> > > Eugeniu Rosca <erosca@de.adit-jv.com> writes:
> > > 
> > > > So, the two approaches lead to different results. If you see any false
> > > > assumption or mistaken belief, could you please pinpoint that? TIA.
> > > 
> > > Perhaps the assumption/belief that the set of commits in a history
> > > can be totally ordered is the issue?  When multiple people work
> > > together on a project, especially in a project where "pull --no-ff"
> > > is not enforced, there can exist only partial order among them?
> > > 
> > As in if you have history with two branches
> > 
> >    D
> >   / \
> >  B   C
> >   \ /
> >    A
> > 
> > commits B and C are not comparable. They are both between A and D but
> > the order of B and C is arbitrary. Different renderings of the history
> > may choose different order of B and C. This is a simle example. Linux
> > history is a spaghetti of tens of branches.
> 
> While in theory 'B' and 'C' might look equivalent, IMHO in practice
> there is a clear distinction between the two. It's commonly known that
> Git refers to 'B' as the 'first parent' of 'D'. Git also provides means
> to identify such first parents via 'git log --first-parent'.
> 
> A fun fact about first parents is that, unless Linus is on vacation
> and hands over his responsibilities to GKH, you will be quite
> confident that 'git log --first-parent linux/master' will list
> stuff committed by Linus himself. That's why (I bet) in the minds
> of people involved in Linux development, the diagram looks like:
> 
>     D
>     | \
>     B  C
>     | /
>     A
And that's not the case. Commits B and C will typically com from
different subsystems, and are truly interchangeable. These subsystems,
again, will have number of separate branches that are merged together
before they are submitted to Linus. Often a feature requires cross-merge
between different subsystems which further complicates the history. Even
if B is a commit authored by Linus and you can infer from that it's on
the master branch it says nothing about order of B and C. They are
still not comparable. And you may still need to reconcile the changes in
B and C in D and whatever order you choose for backporting them you will
need to reflect D in both B and C in the conflicting case.

HTH

Michal

  reply	other threads:[~2020-05-28 20:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-26  6:53 Assessing about commit order in upstream Linux Eugeniu Rosca
2020-05-26 15:21 ` Junio C Hamano
2020-05-26 17:14   ` Michal Suchánek
2020-05-28 18:12     ` Eugeniu Rosca
2020-05-28 20:25       ` Michal Suchánek [this message]
2020-05-28 17:59   ` Eugeniu Rosca

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=20200528202538.GK25173@kitsune.suse.cz \
    --to=msuchanek@suse.de \
    --cc=avarab@gmail.com \
    --cc=erosca@de.adit-jv.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=roscaeugeniu@gmail.com \
    --cc=szeder.dev@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).