git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Michael Ernst <mernst@cs.washington.edu>
To: git@vger.kernel.org
Subject: Feature request: a merge strategy that makes any file difference a merge conflict
Date: Fri, 29 Mar 2024 12:20:59 -0700	[thread overview]
Message-ID: <CAAJCdQQB3_DWOTCTbb-TAkLUX_XVd5TBd3z0M2_KrHxKxr69Kw@mail.gmail.com> (raw)

Git's built-in merge strategies, such as ort, sometimes create a
clean-but-incorrect merge.  A merge driver or a mergetool cannot be
used to correct such problems, because a merge driver or mergetool is
only called when the strategy resulted in a conflict (so far as I
understand).  It is challenging to write a merge strategy, but it is
much easier to write a merge driver or a mergetool.

If git had a strategy that always caused a merge conflict (even when
the differences are mergeable), then a merge driver or mergetool would
be called on every file difference.  This effectively permits a user
to completely replace git's merge strategy, without the difficulty of
writing a merge strategy.

I realize that the proposed strategy would likely only create merge
conflicts when no two of {parent1,parent2,base} are the same -- that
is, only when the low-level merge driver `git merge-file` is called.
That is fine with me.

What do you think of this feature request?

Thanks in advance,
-Mike


             reply	other threads:[~2024-03-29 19:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-29 19:20 Michael Ernst [this message]
2024-03-29 19:40 ` Feature request: a merge strategy that makes any file difference a merge conflict Junio C Hamano
2024-03-29 20:43   ` Michael Ernst
2024-04-01 11:00 ` Thomas Braun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAJCdQQB3_DWOTCTbb-TAkLUX_XVd5TBd3z0M2_KrHxKxr69Kw@mail.gmail.com \
    --to=mernst@cs.washington.edu \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).