From: Junio C Hamano Date: Sun, 24 Jan 2016 22:09:01 GMT Subject: Re: [PATCH v2 0/1] Let merge-file write out conflict markers with correct EOLs Message-ID: In-Reply-To: Johannes Schindelin writes: > 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.