Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH v3] mergetool: Provide an empty file when needed

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:52:50

Jason Wenger [off-list ref] writes:
On Fri, Jan 20, 2012 at 01:53, David Aguilar [off-list ref] wrote:
quoted
On Thu, Jan 19, 2012 at 11:47 PM, David Aguilar [off-list ref] wrote:
quoted
Some merge tools cannot cope when $LOCAL, $BASE, or $REMOTE
are missing.  $BASE can be missing when two branches
independently add the same filename.  $LOCAL and $REMOTE
can be missing when a delete/modify conflict occurs.

Provide an empty file to make these tools happy.
This is cleaner, yes -- but is this extra processing on $LOCAL and
$REMOTE necessary?  Git mergetool doesn't actually call an external
mergetool during del/mod conflicts -- instead it goes into an
alternate processing and prompts the user interactively whether to
take the deleted or modified file.  Can these changes be reached?
(command line option I'm not aware of?)
Thanks for a careful reading. I did not read outside the context of the
patch so I didn't know if we had special cases for del/mod.

A bigger question is if the del/mod codepaths are negatively affected by
the presense of these superfluous empty $LOCAL/$REMOTE files. If they are,
this change will _break_ things. If they are not, I think the change would
be OK.

Another small worry is that this could potentially negatively affect some
merge tools that are sufficiently clueful, if it can give different and
better results for a true two-way-merge than a simulated two-way-merge
this patch feeds them by using a three-way-merge with an empty file as a
base.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help