git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Eugeniu Rosca <erosca@de.adit-jv.com>
To: "Michal Suchánek" <msuchanek@suse.de>
Cc: "Junio C Hamano" <gitster@pobox.com>,
	"Eugeniu Rosca" <erosca@de.adit-jv.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 20:12:26 +0200	[thread overview]
Message-ID: <20200528181226.GB9275@lxhi-065.adit-jv.com> (raw)
In-Reply-To: <20200526171443.GE25173@kitsune.suse.cz>

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

IMHO the fact that 'A' is the parent of 'C' (IOW 'C' has an appropriate
base version) is mostly important to achieve an effortless merge of 'C'
and later on loses its major significance. So, I would say that
(contents-wise) the diagram can be further reduced to:

    D
    | \
    B  D^2
    |
    A

Just visually, a sane backporting order looks A, B an D^2 (A is assumed
non-merge and D is skipped, since cherry picking merges is not common).

I am quite sure people have thought about backporting techniques and
strategies long before I started to ask these questions. So, I am
still looking forward to seeing various experiences shared.

-- 
Best regards,
Eugeniu Rosca

  reply	other threads:[~2020-05-28 18:13 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 [this message]
2020-05-28 20:25       ` Michal Suchánek
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=20200528181226.GB9275@lxhi-065.adit-jv.com \
    --to=erosca@de.adit-jv.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=msuchanek@suse.de \
    --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).