"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: merge chokes, creates bogus conflicts
To:
Mark Jamsek <mark@jamsek.com>
Cc:
Christian Weisgerber <naddy@mips.inka.de>, gameoftrees@openbsd.org
Date:
Thu, 16 Feb 2023 13:27:16 +0100

Download raw body.

Thread
On Thu, Feb 16, 2023 at 11:14:54PM +1100, Mark Jamsek wrote:
> On 23-02-16 12:45PM, Stefan Sperling wrote:
> > On Thu, Feb 16, 2023 at 02:11:54AM +0100, Stefan Sperling wrote:
> > > If we want to allow users to commit such files in spite of the
> > > obvious downsides, here is a patch which would make it possible:
> 
> I agree that, while such conflict markers should not be embedded
> verbatim into versioned files, users should be able to override this
> check and commit unresolved conflicts for such cases as demonstrated by
> this thread. IIRC, git just lets you commit conflicts, but we don't in
> Fossil, so a flag is provided to allow committing with unresolved
> conflicts.  However, I might even suggest we only allow such commits
> interactively, by prompting the user when the -C flag is used and
> conflicts indeed do exist in the commitables to confirm they want to
> commit despite the unresolved conflicts.
> 
> In any case, I'll have a go at implementing your below proposal.

Great, thanks! Please feel free to use the diff I sent as a starting point.

> It'll
> be trivial to add a confirmation prompt after that's done if we think an
> extra layer is needed. It' just a lot easier to resolve conflicts as
> they arise rather than sometime later and perhaps even by someone other
> than the conflict creator.

I agree that such a prompt would be nice to have. And yes, this should
be added afterwards because this will create churn as there would need
to be a new callback which gets passed around and implements the prompt.

There should again be a way to disable the interactive check (such as
via -N) because there might be cases where merges get scripted and may
need to deal with such weird files.