Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Jan 2024 08:35:37 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Ed Maste <emaste@freebsd.org>
Cc:        Cy Schubert <Cy.Schubert@cschubert.com>, Jessica Clarke <jrtc27@freebsd.org>,  Jung-uk Kim <jkim@freebsd.org>, src-committers <src-committers@freebsd.org>,  "<dev-commits-src-all@freebsd.org>" <dev-commits-src-all@freebsd.org>,  "<dev-commits-src-main@freebsd.org>" <dev-commits-src-main@freebsd.org>
Subject:   Re: git: 722b16673c40 - main - acpica: Import ACPICA 20230331
Message-ID:  <CANCZdfpKpM8VBt=MgBi%2B%2BUDN0a2KuGeTzvoKRyxQaHGC57JWvw@mail.gmail.com>
In-Reply-To: <CAPyFy2D=-D_eJW=GJCKThrw%2BJpuU=w2x-5KkarBmQg40SDc0EQ@mail.gmail.com>
References:  <202401310406.40V46AUG000837@gitrepo.freebsd.org> <3BE4D4E2-DFF3-4F68-B3D3-8CE9C27089A5@freebsd.org> <20240130205710.11cf19cf@slippy> <CANCZdfr_kWeBKH5bpWRs6XPUQfbikow8MK%2B3edmDVse7j_QsOQ@mail.gmail.com> <20240131051743.EDDE915B@slippy.cwsent.com> <CAPyFy2D=-D_eJW=GJCKThrw%2BJpuU=w2x-5KkarBmQg40SDc0EQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On Wed, Jan 31, 2024 at 7:50 AM Ed Maste <emaste@freebsd.org> wrote:

> On Wed, 31 Jan 2024 at 00:17, Cy Schubert <Cy.Schubert@cschubert.com>
> wrote:
> >
> >  but would the history graph be different? Or does that matter?
>
> It will be different - a merge would be
>
> main   --- A --- B ---- C ---- D
>                 /             /
>               /             /
> vendor --- X ------------ Y
>
> cherry-pick will be:
>
> main   --- A --- B ---- C ---- D'
>                 /
>               /
> vendor --- X ------------ Y
>
> as you mention D and D' have the same contents, but D' has only one
> parent. When searching for unmerged changes commit Y might be
> reported, but that view of the history won't otherwise cause material
> issues.
>
> If there's another update in the future and it's merged we'll be back to:
>
> main   --- A --- B ---- C ---- D' --- E
>                /                     /
>              /                     /
> vendor --- X ------------ Y ---- Z
>
> In this case Y would no longer get reported as needing to be merged.
>

There's an important detail here. If D really is identical to D' except
for the second parent and its delta is the same as from X to Y, then when
it comes time to merge Z to create E, we'll be fine. Git understands how
to cope with cherry-picked changed in this situation because the change
hash (different than the commit hash) will be the same. However, if there
was
any change at all, no matter how trivial or trifling, then it will consider
those changes in need of merging, and conflicts are possible during that
process.It will require that you do additional work to sort them out when
you
sorted out them already in the cherry-pick. If we always merge, the only
conflicts that are possible are actual conflicts. It's why we don't do this
by
cherry-pick generally. While rerere can code adequately, the data for rerere
is on an individual's machine, while the merge info metadata is inside the
pushed repo.

Warner

[-- Attachment #2 --]
<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 31, 2024 at 7:50 AM Ed Maste &lt;<a href="mailto:emaste@freebsd.org">emaste@freebsd.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, 31 Jan 2024 at 00:17, Cy Schubert &lt;<a href="mailto:Cy.Schubert@cschubert.com" target="_blank">Cy.Schubert@cschubert.com</a>&gt; wrote:<br>
&gt;<br>
&gt;  but would the history graph be different? Or does that matter?<br>
<br>
It will be different - a merge would be<br>
<br>
main   --- A --- B ---- C ---- D<br>
                /             /<br>
              /             /<br>
vendor --- X ------------ Y<br>
<br>
cherry-pick will be:<br>
<br>
main   --- A --- B ---- C ---- D&#39;<br>
                /<br>
              /<br>
vendor --- X ------------ Y<br>
<br>
as you mention D and D&#39; have the same contents, but D&#39; has only one<br>
parent. When searching for unmerged changes commit Y might be<br>
reported, but that view of the history won&#39;t otherwise cause material<br>
issues.<br>
<br>
If there&#39;s another update in the future and it&#39;s merged we&#39;ll be back to:<br>
<br>
main   --- A --- B ---- C ---- D&#39; --- E<br>
               /                     /<br>
             /                     /<br>
vendor --- X ------------ Y ---- Z<br>
<br>
In this case Y would no longer get reported as needing to be merged.<br></blockquote><div><br></div>There&#39;s an important detail here. If D really is identical to D&#39; except</div><div class="gmail_quote">for the second parent and its delta is the same as from X to Y, then when</div><div class="gmail_quote">it comes time to merge Z to create E, we&#39;ll be fine. Git understands how</div><div class="gmail_quote">to cope with cherry-picked changed in this situation because the change</div><div class="gmail_quote">hash (different than the commit hash) will be the same. However, if there was</div><div class="gmail_quote">any change at all, no matter how trivial or trifling, then it will consider</div><div class="gmail_quote">those changes in need of merging, and conflicts are possible during that</div><div class="gmail_quote">process.It will require that you do additional work to sort them out when you</div><div class="gmail_quote">sorted out them already in the cherry-pick. If we always merge, the only</div><div class="gmail_quote">conflicts that are possible are actual conflicts. It&#39;s why we don&#39;t do this by</div><div class="gmail_quote">cherry-pick generally. While rerere can code adequately, the data for rerere</div><div class="gmail_quote">is on an individual&#39;s machine, while the merge info metadata is inside the</div><div class="gmail_quote">pushed repo.</div><div class="gmail_quote"><br></div><div class="gmail_quote">Warner<br></div></div>

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfpKpM8VBt=MgBi%2B%2BUDN0a2KuGeTzvoKRyxQaHGC57JWvw>