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

Re: [PATCH/v2] Remove filename from conflict markers

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:00

Martin Renold [off-list ref] writes:
Put filenames into the conflict markers only when they are different.
Otherwise they are redundant information clutter.

Print the filename explicitely when warning about a binary conflict.
I think we are getting closer.
-	grep "Cannot merge binary files: HEAD:binary-file vs. F:binary-file" \
-		merge.err
+	grep "Cannot merge binary files: binary-file (HEAD vs. F)" merge.err
In the original code, if you are not in "merge renamed" situation, you
would see something like this.

    "Cannot merge binary files: HEAD:porn.jpg vs F:porn.jpg"

And the patch changes it to

    "Cannot merge binary files: porn.jpg (HEAD vs F)"

which is an improvement.  I have to wonder, if it even necessary to say
HEAD vs F when no rename is involved, though.  Probably it is, as this is
about binary files, and the user may need to extract the contents with
something like "git cat-file blob HEAD:porn.jpg >tmp1.jpg".

When you are indeed in "merge renamed" situation, it gets a bit more
interesting.  The original said

    "Cannot merge binary files: HEAD:porn.jpg vs F:porn112.jpg"

which makes it clear that what is merged with what, but did not say where
the resulting merge will go.  The updated output would say something like
this

    "Cannot merge binary files: porn.jpg (HEAD:porn.jpg vs F:porn112.jpg)"

which adds information and is probably better.

So overall, I like what the change does, but I'd probably wait for a few
more days just in case there are objections from different corners,
primarily because I am somewhat concerned that this change might affect
users of mergetool (which I do not use myself) in some negative way.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help