-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CRLF detection fails for files checked in with CRLF line endings #24
Comments
There I am not really sure what to do! any idea? |
It does not appear that Libgit2Sharp yet supports the lower level libgit2 In the absence of an attribute API, the only reliable way to find out is to actually retrieve the blob corresponding to the file you are diffing with and inspect it's contents for line endings. Whatever line endings the blob has, you would have to convert to use the same line endings in the blob you are creating. |
@ricksladkey Could you please try with the beta release of version 2.0.0 on Visual Studio 2013 to see if it fixes your issues! That would be really helpful.Thanks |
I'll take a look. Thanks! |
Thanks Rick! |
With v1.3 if:
core.autocrlf=true
then GitDiffMargin will show the entire file as a having been changed. This happens whether the file in the repository is "denormalized" (has the
text
attribute) or whether it is by design (the file has the-text
attribute).In git, if the
.gitattributes
file specifies that a given file or files is not text (via the-text
specifier), then no end of line conversion will be performed on that file.Ironically, the GitDiffMargin repository itself contains some denormalized files, i.e. checked in with CRLF line endings, as can be seen by checking the repository out in Linux:
The text was updated successfully, but these errors were encountered: