File diffs always show whitespace changes [message #895758] |
Sun, 15 July 2012 19:43 |
Derek Battams Messages: 2 Registered: July 2012 |
Junior Member |
|
|
Running EGit 2.0.0.201206130900-r/Eclipse 4.2 on Win7.
Anytime I diff a file within Eclipse against any version from my Git repository, the comparison always shows whitespace changes, even if I compare a freshly committed file against HEAD (which shouldn't show any differences). Yet, if I go to the command line and do a git-diff of my working copy against my repo then the diffs look as I'd expect (i.e. the tonnes of whitespace diffs aren't present). So it appears the diff being done by EGit is causing the issue. These whitespace diffs make it almost impossible to view file diffs as needed before committing. Is there some way to correct this?
Help appreciated.
This screen is comparing a file to HEAD immediately after committing the file to my repo. I'd expect zero differences to be reported and if I run git-diff from the command line I do indeed get zero differences, but EGit is showing all of these whitespace differences.
[Updated on: Sun, 15 July 2012 19:48] Report message to a moderator
|
|
|
|
|
|
Re: File diffs always show whitespace changes [message #899896 is a reply to message #895797] |
Thu, 02 August 2012 18:00 |
Mark Mikofski Messages: 3 Registered: August 2012 |
Junior Member |
|
|
I came to the same conclusion as Ed Merks. It took me a while to realize that it wasn't just showing me whitespace, but it was showing the entire file as one be change, and what would do that? Well the obvious answer was line-endings. I was able to confirm it by comparing my local version with the "local history" - correctly shows changes, then compare two commits, also works correctly, but anytime you compare a local file to a git file, you get one giant change, which is a unfortunately useless. This is evidently addressed in Bug 361503 which, I believe, is the right approach - just include an option to ignore line-endings in diffs in the comparison editor. My suggestion to everyone in this post is to follow the link to this "bug" and vote for it so that this option gets changed. You will need to login.
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04177 seconds