I've been going through cleaning up my company's repository for LF normalization, following this method here, all the way up to git status
: https://stackoverflow.com/a/4683783/1827734
I've used this set of settings in my .gitattributes
file:
* text=auto
*.sln text eol=crlf
*.asax text eol=crlf
*.cs text eol=crlf diff=csharp
*.csproj text eol=crlf
The codebase is mostly java files, but there are a few C# files (.cs, .sln, etc) that git is trying to mark as changed. I've could verify that it was a CRLF -> LF conversion for other files in the codebase because of the warning that shows when you git diff
them, but there is no warning like that for these files (as expected). I've tried using other diff programs like Meld to see if they show something else (using cat and piping to pbcopy, making sure to show whitespace differences), they're reported as identical. When I use the --ignore-space-at-eol
or --ignore-space-change
flags, no differences show, so it's leading me to believe that there's some white space change somewhere that git sees but I can't even see how that would be possible after using different diff programs.
The only other guess I'd have is the BOM character at the beginning of the file; it's the only thing that stands out as different about these files, yet the values shown are also identical:
Using: * OSX 10.10.5 * git version 2.3.8 (Apple Git-58)