git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Assessing about commit order in upstream Linux

From
EREugeniu Rosca <erosca@de.adit-jv.com>
Date
May 28, 2020, 18:12 UTC
Message-ID
<20200528181226.GB9275@lxhi-065.adit-jv.com>
In-Reply-To
<20200526171443.GE25173@kitsune.suse.cz>
Hi Michal,
On Tue, May 26, 2020 at 07:14:43PM +0200, Michal Suchánek wrote:
Show 23 quoted lines
> 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
Previous: Michal SuchánekNext: Michal Suchánek
Message 4 of 6 in “Assessing about commit order in upstream Linux”
  1. Eugeniu RoscaMay 26, 2020
  2. Junio C HamanoMay 26, 2020
  3. Michal SuchánekMay 26, 2020
  4. Eugeniu RoscaMay 28, 2020
  5. Michal SuchánekMay 28, 2020
  6. Eugeniu RoscaMay 28, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.