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

Re: [RFC] (reverse) combined diff conflict style

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 18, 2010, 20:34 UTC
Message-ID
<7v1vgi8eqw.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1266521789-3617-1-git-send-email-bert.wesarg@googlemail.com>
Bert Wesarg <bert.wesarg@googlemail.com> writes:
Show 16 quoted lines
> ----- output ----
>
> 1
> <<<<<<<
>  -2
> - 3
> >>>>>>>
> 4
>
> ------ end ------
>
> As you can see, the conflict region is way smaller as the diff3 one, but
> keeps all information.
>
> I'm not doing much merges myself, so there are probably people out there who
> can better judge the usefulness of this style.

As a format to review conflicted regions in a pager, this might be a good alternative representation.

But I doubt I would want to use this as a way for "git merge", "git am -3" and their friends to write a half-merged result out to the work tree for me to resolve. With either --conflict=merge or --conflict=diff3, it is easy to pick lines from either side (you remove what is not needed in the final result), but with this format you always have to not just pick but remove the change marker at the beginning from the "these are good, I'd use them" lines. And you have to do so for every single line you reuse from either side.

Previous: Bert WesargNext: Bert Wesarg
Message 2 of 3 in “[RFC] (reverse) combined diff conflict style”
  1. Bert WesargFeb 18, 2010
  2. Junio C HamanoFeb 18, 2010
  3. Bert WesargFeb 19, 2010

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.