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

Re: Merge format documented?

From
AGAndreas Gruenbacher <agruen@suse.de>
Date
Mar 23, 2009, 07:18 UTC
Message-ID
<200903230818.20044.agruen@suse.de>
In-Reply-To
<7vtz5k99tr.fsf@gitster.siamese.dyndns.org>
On Monday, 23 March 2009 4:50:24 Junio C Hamano wrote:
Show 9 quoted lines
> Andreas Gruenbacher <agruen@suse.de> writes:
> > is the format that git normally uses for indicating merge conflicts in
> > files (the <<< === >>> markers) documented somewhere?  How exactly does
> > it differ from the diff3 format (<<< ||| === >>>)?  Diff3's -m mode seems
> > to come close to what git does, except that git doesn't produce the |||
> > section:
>
> It is an imitation of output from "merge" program of RCS suite Paul you
> know maintains ;-)

So it's the same format except that diff3's ||| section isn't shown. I was wondering if there are any additional tricks.

Patch should support that too, even from the more limited information it has.
Show 7 quoted lines
> Recent versions of git supports merge.conflictstyle 
> configuration variable and --conflict option in 'git-checkout' to write
> the conflicts out in a format that is an imitation of "diff3 -m" output.
>
> As far as I know, neither "git" format is documented anywhere, but I
> didn't find an official format specification of the "upstream" formats,
> and that is why I keep saying "imitation" in the above paragraph ;-)

The diff info pages describe the diff3 format; that may be enough documentation:

  info -f diff -n "Marking Conflicts"

Thanks, Andreas

Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 6 in “Merge format documented?”
  1. Andreas GruenbacherMar 23, 2009
  2. Junio C HamanoMar 23, 2009
  3. Andreas GruenbacherMar 23, 2009
  4. Junio C HamanoMar 23, 2009
  5. Johannes SixtMar 23, 2009
  6. Jakub NarebskiMar 27, 2009

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.