If I run vc-diff when in an edited file of a git repro, I git a new buffer that shows me way more than I expected. It marks every line of the HEAD version of the file as deleted, and every line of the working copy of the file as added, so basically I see two full versions of the file.
This is not very useful!
If I run git diff path\to\edited\file in dos, or in git bash, I get what I expect vc-diff to give me: a short diff with just the actually added and deleted lines.
I have magit installed and when I look at diffs in that I get the same problem.
This is on windows running the official windows binary of emacs 24.1.1.
I would bet solid money you’ve changed your line endings accidentally in your editor, or have a
core.autocrlfsetting that’s changed them for you. In other words, it’s showing a diff because in one version, the lines end in CRLF; in the other, they end in just LF.I’d poke at your editor settings and see what
git config --global core.autocrlfreturns.