Subject: Re: git merge-tree: bug report and some feature requests

From: Ævar Arnfjörð Bjarmason <[email-masked]>
Date: Sun, 21 Jan 2018 09:14:36 +0100

On Sun, Jan 21 2018, Josh Bleecher Snyder jotted:

> 3. Feature suggestion
>
> There's no direct indication of whether any given file's merge
> succeeded. Currently I sniff for merge conflicts by looking for
> "+<<<<<<< .our", which feels like an ugly kludge. Could we provide an
> explicit indicator? (And maybe also one for binary vs text
> processing?)
>
> Note that binary file merge conflicts don't generate patches with
> three-way merge markers but instead say "warning: Cannot merge binary
> files: binary (.our vs. .their)". Looking for this case even further
> complicates the output parser.

I thought I had a way to do this, but looking back in my logs I find
that I was just using:

    git merge-tree $(git merge-base A B) A B | grep -e '^\+======='; echo $?

I.e. a variation of what you're doing, which as you note won't work for
binary files.