Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Jan 2024 14:51:51 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Mathieu Arnold <mat@freebsd.org>
Cc:        Christian Weisgerber <naddy@mips.inka.de>, freebsd-git@freebsd.org
Subject:   Re: Force merge conflicts?
Message-ID:  <CANCZdfpL3oLTCky=xrSGcvzzn=NfX03LSf4Jm8cf=b45z01Mgw@mail.gmail.com>
In-Reply-To: <e53efg54xnxf44gzgmidbg2xt2l44nzmhyf3mxyf5q7znpptwy@3dujcp225dnm>
References:  <Za_SdBnXJkerj8gF@lorvorc.mips.inka.de> <e53efg54xnxf44gzgmidbg2xt2l44nzmhyf3mxyf5q7znpptwy@3dujcp225dnm>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000d594f2060fa3f43f
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Tue, Jan 23, 2024 at 11:20=E2=80=AFAM Mathieu Arnold <mat@freebsd.org> w=
rote:

> On Tue, Jan 23, 2024 at 03:51:32PM +0100, Christian Weisgerber wrote:
> > Is there a way to tell git to create a conflict when two branches
> > have the same change?
>
> I had a look and Git conflicts' resolution does not seem to be able to
> do that. For Git, when you merge two files that have the same change,
> then it assumes that it is the same change and is happy with it.
>
> For the case you are talking about, I would either:
>
> - Defer the PORTREVISION bump to when the branch is ready to be merged,
>   and automate it with one of the scripts in Tools.
> - Bump PORTREVISON and add a comment on the same line with, say,
>   `# TODO: remove me` so that it forces a conflict to arise and
>   mechanically remove them before merging.
>

Personally, I'd set PORTREVISION to 100 in the branch and merge often. Who
says that
the first bump has to be to 1? If you really want it to be the numerically
next number, bump
it each time there's a conflict, (so 101, 102, 103) then you can look for
those > 100 and
re-adjust. If this has been done before, start at 200, etc. Since there's
nothing wrong with 100,
though, you could do this and land it like that in the main tree.

It's a different variation on the force a conflict ploy though

Warner

--000000000000d594f2060fa3f43f
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Tue, Jan 23, 2024 at 11:20=E2=80=
=AFAM Mathieu Arnold &lt;<a href=3D"mailto:mat@freebsd.org">mat@freebsd.org=
</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:=
0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">=
On Tue, Jan 23, 2024 at 03:51:32PM +0100, Christian Weisgerber wrote:<br>
&gt; Is there a way to tell git to create a conflict when two branches<br>
&gt; have the same change?<br>
<br>
I had a look and Git conflicts&#39; resolution does not seem to be able to<=
br>
do that. For Git, when you merge two files that have the same change,<br>
then it assumes that it is the same change and is happy with it.<br>
<br>
For the case you are talking about, I would either:<br>
<br>
- Defer the PORTREVISION bump to when the branch is ready to be merged,<br>
=C2=A0 and automate it with one of the scripts in Tools.<br>
- Bump PORTREVISON and add a comment on the same line with, say,<br>
=C2=A0 `# TODO: remove me` so that it forces a conflict to arise and<br>
=C2=A0 mechanically remove them before merging.<br></blockquote><div><br></=
div><div>Personally, I&#39;d set PORTREVISION to 100 in the branch and merg=
e often. Who says that</div><div>the first bump has to be to 1? If you real=
ly want it to be the numerically next number, bump</div><div>it each time t=
here&#39;s a conflict, (so 101, 102, 103) then you can look for those &gt; =
100 and</div><div>re-adjust. If this has been done before, start at 200, et=
c. Since there&#39;s nothing wrong with 100,</div><div>though, you could do=
 this and land it like that in the main tree.<br></div><div><br></div><div>=
It&#39;s a different variation on the force a conflict ploy though<br></div=
><div><br></div><div>Warner<br></div></div></div>

--000000000000d594f2060fa3f43f--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfpL3oLTCky=xrSGcvzzn=NfX03LSf4Jm8cf=b45z01Mgw>