public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
* Feature request: a merge strategy that makes any file difference a merge conflict
@ 2024-03-29 19:20 Michael Ernst
  2024-03-29 19:40 ` Junio C Hamano
  2024-04-01 11:00 ` Thomas Braun
  0 siblings, 2 replies; 4+ messages in thread
From: Michael Ernst @ 2024-03-29 19:20 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-04-01 11:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-29 19:20 Feature request: a merge strategy that makes any file difference a merge conflict Michael Ernst
2024-03-29 19:40 ` Junio C Hamano
2024-03-29 20:43   ` Michael Ernst
2024-04-01 11:00 ` Thomas Braun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox