git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jan 21, 2018, 08:14 UTC
Message-ID
<87607viq6r.fsf@evledraar.gmail.com>
In-Reply-To
<CAFAcib-2fxiVxtVWcbvafY3-Br7Y70HMiHFZoT0VfK6JU0Dp9A@mail.gmail.com>
On Sun, Jan 21 2018, Josh Bleecher Snyder jotted:
Show 12 quoted lines
> 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.

Previous: Josh Bleecher SnyderNext: Elijah Newren
Message 2 of 7 in “git merge-tree: bug report and some feature requests”
  1. Josh Bleecher SnyderJan 21, 2018
  2. Ævar Arnfjörð BjarmasonJan 21, 2018
  3. Elijah NewrenJan 22, 2018
  4. Josh Bleecher SnyderJan 23, 2018
  5. Edward ThomsonJan 23, 2018
  6. Josh Bleecher SnyderJan 24, 2018
  7. Elijah NewrenJan 24, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.