-
-
Notifications
You must be signed in to change notification settings - Fork 41
The whole file is highlighted as modified #82
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
Comments
I've never seen anything like this. My guess is there's another extension which is changing the line endings of the file behind the scenes. Off the top of my head I'm not quite sure how to debug this. Any ideas @laurentkempe? |
Actually, another possibility is the path to the file (including the file name) within the project file in Visual Studio differ from the file on disk by case only. ❓ Try restarting Visual Studio and opening this file without opening the solution (just open the file by itself in a fresh copy of Visual Studio. Does the problem still occur? If so, make sure that the path to the file on your drive (Windows is case-insensitive) matches the path to this file within the Git repository (which is case-sensitive), and try again. |
I was also thinking of the line endings. I currently do not have the C++ installed to try reproduce it, will try to install it to have a look |
Ok, that's what I was able to find out:
So it seems like your guess was right in the spot! |
I've had exactly the same problem, I only see the real diffs if I change the line ending from Windows to Unix style as @mmatrosov points out (File -> Advanced Save Options...). The only difference I have is that I see this with a .cs project, not a .cpp one. But is there a way to make GitDiffMargin work without doing this? |
@mattwarren Could it be your .gitattributes that set the file to Unix? |
@laurentkempe Cool. As stated here, if I add |
@laurentkempe |
If a file has any changes, the whole file is highlighted as modified. The bug is reproduced with all other extensions disabled.
Visual C++ project, C++ file, Visual Studio 2015, Windows 10 x64 (same was under Windows 7 x64), GitDiffMargin v3.1.0.0.
The text was updated successfully, but these errors were encountered: