Date: Wed, 24 Jan 2024 04:47:45 -0600 From: Unit Runker <unitrunker@gmail.com> To: freebsd-git@freebsd.org Subject: Re: Force merge conflicts? Message-ID: <1a6cf9f5-73b1-4ad5-a6d6-efaa72f5a193@gmail.com> In-Reply-To: <CANCZdfpL3oLTCky=xrSGcvzzn=NfX03LSf4Jm8cf=b45z01Mgw@mail.gmail.com> References: <Za_SdBnXJkerj8gF@lorvorc.mips.inka.de> <e53efg54xnxf44gzgmidbg2xt2l44nzmhyf3mxyf5q7znpptwy@3dujcp225dnm> <CANCZdfpL3oLTCky=xrSGcvzzn=NfX03LSf4Jm8cf=b45z01Mgw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------K6AjY00nB7m3rNpYPoC1H96e Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hello all; On 1/23/2024 3:51 PM, Warner Losh wrote: > On Tue, Jan 23, 2024 at 11:20 AM Mathieu Arnold <mat@freebsd.org> wrote: > > 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 An alternative: don't touch the PORTREVISION until your PR is ready to be merged. You can merge all day long and not cause a conflict on this one line. --------------K6AjY00nB7m3rNpYPoC1H96e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <p>Hello all;<br> </p> <div class="moz-cite-prefix">On 1/23/2024 3:51 PM, Warner Losh wrote:<br> </div> <blockquote type="cite" cite="mid:CANCZdfpL3oLTCky=xrSGcvzzn=NfX03LSf4Jm8cf=b45z01Mgw@mail.gmail.com"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <div dir="ltr"> <div dir="ltr">On Tue, Jan 23, 2024 at 11:20 AM Mathieu Arnold <<a href="mailto:mat@freebsd.org" moz-do-not-send="true" class="moz-txt-link-freetext">mat@freebsd.org</a>> wrote:</div> <div class="gmail_quote"> <blockquote class="gmail_quote" style="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> > Is there a way to tell git to create a conflict when two branches<br> > have the same change?<br> <br> I had a look and Git conflicts' 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> and automate it with one of the scripts in Tools.<br> - Bump PORTREVISON and add a comment on the same line with, say,<br> `# TODO: remove me` so that it forces a conflict to arise and<br> mechanically remove them before merging.<br> </blockquote> <div><br> </div> <div>Personally, I'd set PORTREVISION to 100 in the branch and merge often. Who says that</div> <div>the first bump has to be to 1? If you really want it to be the numerically next number, bump</div> <div>it each time there's a conflict, (so 101, 102, 103) then you can look for those > 100 and</div> <div>re-adjust. If this has been done before, start at 200, etc. Since there'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's a different variation on the force a conflict ploy though<br> </div> <div><br> </div> <div>Warner<br> </div> </div> </div> </blockquote> <p><br> </p> <p>An alternative: don't touch the PORTREVISION until your PR is ready to be merged. You can merge all day long and not cause a conflict on this one line.<br> </p> </body> </html> --------------K6AjY00nB7m3rNpYPoC1H96e--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1a6cf9f5-73b1-4ad5-a6d6-efaa72f5a193>