Junio C Hamano <gitster@xxxxxxxxx> writes: > Charles Bailey <charles@xxxxxxxxxxxxx> writes: > >> Previously, git mergetool used cat-file which does not perform git to >> worktree conversion. This changes mergetool to use git checkout-index >> instead which means that the temporary files used for mergetool use the >> correct line endings for the platform. >> >> Signed-off-by: Charles Bailey <charles@xxxxxxxxxxxxx> > > Sounds like the right thing to do and from a cursory review it looks Ok to > me. > > But I do not use mergetool myself, so an Ack from Ted and a Thanks from > whoever reported the breakage would be encouraging ;-). I apologize for not being able to test this earlier and I'm certainly thankful for the patch, although admittedly I reported the issue mainly to help improve git, not because mergetool is part of my normal use of git (that may change when I find time to study it and see if I can easily add ediff support to it in addition to emerge). Now that I tried the patch, I observed that while the stage2 and stage3 temporary files have CRLF line endings, the merge result buffer/file has LF line endings. I'm again using Cygwin git, mergetool -t emerge and native Windows Emacs. So when I quit the mergetool, I get ... Hit return to start merge resolution tool (emerge): warning: LF will be replaced by CRLF in kala.txt warning: LF will be replaced by CRLF in kala.txt and indeed hexdump proves that the file in my worktree now has LF line endings even though it had CRLF line endings before invoking mergetool. I wonder why I didn't notice this the first time. I can certainly reproduce it now without Charles' patch as well so I suppose this is a separate issue and the patch does what it is supposed to do. -- Hannu -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html