Coder Social home page Coder Social logo

Comments (9)

mmatrosov avatar mmatrosov commented on July 29, 2024 2

@laurentkempe Cool. As stated here, if I add .gitattributes file with the line * text=auto or execute a command git config --global core.autocrlf true, the issue is gone. Thank you for the hint!

from gitdiffmargin.

jwidar avatar jwidar commented on July 29, 2024 1

Hello.

I'm having this issue today 1 march 2019, using the newest version 3.9.2.42 updated automatically by Visual Studio 2017.

Microsoft Visual Studio Professional 2017
Version 15.9.7
VisualStudio.15.Release/15.9.7+28307.423
Microsoft .NET Framework
Version 4.7.03056

Installed Version: Professional

image
The only line I have changed in the file is the one marked in orange.
According to git, only that line is changed:
image
I have seen it a few times recently, but cannot remember if it begun today or earlier.

from gitdiffmargin.

sharwell avatar sharwell commented on July 29, 2024

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?

from gitdiffmargin.

sharwell avatar sharwell commented on July 29, 2024

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.

from gitdiffmargin.

laurentkempe avatar laurentkempe commented on July 29, 2024

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

from gitdiffmargin.

mmatrosov avatar mmatrosov commented on July 29, 2024

Ok, that's what I was able to find out:

  1. There is no interference with any other extensions: I disabled all of them
  2. There is no difference whether I open the file as a part of a solution or as an independent file
  3. The bug is reproduced in both Visual Studio 2013 and 2015. However, on Visual Studio 2013 on a different computer with the similar environment I do not experience this bug.
  4. If I change line endings from Windows style to Unix style, the bug disappears

So it seems like your guess was right in the spot!

from gitdiffmargin.

mattwarren avatar mattwarren commented on July 29, 2024

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?

from gitdiffmargin.

laurentkempe avatar laurentkempe commented on July 29, 2024

@mattwarren Could it be your .gitattributes that set the file to Unix?

from gitdiffmargin.

jwidar avatar jwidar commented on July 29, 2024

@laurentkempe
I got rid of the problem mentioned above by reverting to v3.9.0
If I install the one labeled security fix, the problem comes back.

from gitdiffmargin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.