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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Martin Renold <martinxyz@xxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]