Re: [PATCH v2 0/1] Let merge-file write out conflict markers with correct EOLs
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 24, 2016, 22:09 UTC
- Message-ID
- <xmqq4me2d402.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <cover.1453632296.git.johannes.schindelin@gmx.de>
Johannes Schindelin <johannes.schindelin@gmx.de> writes:
Show 10 quoted lines
> The crucial idea hit me yesterday when I took a step back: all > we need to do is to ensure that the end-of-line style is matched > when *all* input files are LF-only, or when they are all CR/LF. > In all other cases, we have mixed line endings anyway. > > And to do that, it is sufficient to look at *one single line > ending* in the context. Technically, it does not even have to be > the context, but the first line endings of the first file would > be enough, however it is so much more pleasant if the conflict > marker's eol matches the one of the preceding line.
I like that approach. My understanding of the xdiff/xmerge code is very rusty and I have some time to re-learn it before I can judge that the change implements that approach correctly, though X-<.
Thanks.