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.