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

Re: [PATCH] Always output a trailing space conflicted merge markers.

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 1, 2009, 02:01 UTC
Message-ID
<7vzlbpxitn.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7v1vp15ppi.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 20 quoted lines
> Nelson Elhage <nelhage@MIT.EDU> writes:
>
>> Some tools, such as emacs' smerge-mode, except that diff3-style merge
>> conflict markers always include a trailing space (and optional
>> description) after the marker, and so fail to correctly detect
>> git's (notably the '|||||||' base marker, for which git never outputs a
>> trailing space).
>>
>> (See http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3553
>> for the emacs issue)
>>
>> Signed-off-by: Nelson Elhage <nelhage@mit.edu>
>> ---
>>  xdiff/xmerge.c |   11 ++++++++---
>>  1 files changed, 8 insertions(+), 3 deletions(-)
>
> Thanks, but I think you also need to update the test scripts.
>
> Don't you want some new tests to protect this from getting broken
> in the future by other people yourself, too?

I actually changed my mind. The plain "diff3" (from GNU diffutils 2.8.1) does not seem to give an trailing space after ||||||| separator. It feels very wrong to change the output format to work around a bug in smerge-mode (which I never use, by the way), if we are not the only offender. With this change, we may be breaking something else that relied on the "diff3" output format that does not have such a trailing space.

I'll drop this patch.
Previous: Junio C HamanoNext: Nanako Shiraishi
Message 3 of 4 in “Always output a trailing space conflicted merge markers.”
  1. Always output a trailing space conflicted merge markers.Nelson Elhage, Jun 30, 2009
  2. Junio C HamanoJun 30, 2009
  3. Junio C HamanoJul 1, 2009
  4. Nanako ShiraishiJul 1, 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.