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

Re: Bug-ish: CRLF endings and conflict markers

From
Shawn O. Pearce <spearce@spearce.org>
Date
Jan 11, 2007, 09:50 UTC
Message-ID
<20070111095046.GA28309@spearce.org>
In-Reply-To
<200701110941.22024.andyparkins@gmail.com>
Andy Parkins <andyparkins@gmail.com> wrote:
> The best solution is probably to use the line ending of the conflicted lines.  
> I've had a look, but I can only fine builtin-rerere.c that generates the 
> markers - would that be the place to make this change?

builtin-rerere may need to change but the code that's actually creating the conflict markers isn't there. Its somewhere in xdiff/xmerge.c. I say somewhere as I haven't dredged down into that code myself, but I know that's where xdl_merge() is and I know its xdl_merge() that actually created the content of the conflict file during the merge.

That said I don't really care about this problem that much. The problem that I care about is its far too easy to convert the lineendings in a file (e.g. CRLF->LF, LF->CRLF). This causes the entire file to differ, making merges very difficult. I really should just fix it (in the one place where it matters to me) by modifying the pre-commit hook to look for such a case and abort.

-- 
Shawn.
Previous: Andy ParkinsNext: Johannes Schindelin
Message 4 of 8 in “Bug-ish: CRLF endings and conflict markers”
  1. Andy ParkinsJan 11, 2007
  2. Johannes SchindelinJan 11, 2007
  3. Andy ParkinsJan 11, 2007
  4. Shawn O. PearceJan 11, 2007
  5. Johannes SchindelinJan 11, 2007
  6. Shawn O. PearceJan 11, 2007
  7. Johannes SchindelinJan 11, 2007
  8. Shawn O. PearceJan 11, 2007

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.