This may seem like an unnecessary question (and maybe it is a question of redundancy), but I can not find the answer. Here's the situation:
My application creates text files with CR as line endings. More specifically, I do not set the final lines in CR, it is just the result of the command that I use to get the body of the text. Of course, I could manually convert CR to LF, but I do not want to avoid this.
Git treat these files as a single line (for example, during diff). I determined through this test repository that the reason for the line ending is: https://github.com/jfletcher4d/diff-test
I'm really not interested in what lines are enclosed in the file system. This is not important, at least for now (I will probably in the end take care if I need to import these files, right now this is just an export). But I do not want to convert CR to LF in my application, if I can avoid it, for performance reasons, as well as for reasons of anal retentivity :) Ie this is not a question of how to create text files, but rather, how to force each text file in repo only have LF.
Can git be configured to change line endings all to LF, even if the files were committed with CR in them?
I am on Windows using TortoiseGit and msysgit (and a bit of TortoiseSVN on the side) interchangeably while I learn git, if that matters.
git newline lf
Josh
source share