Eclipse's Package Explorer is marking my file as Dirty.

enter image description here

But when I compare the file with the index (ie, Right click > Compare With > Git Index), I see no differences other than my line endings, which should have been dealt with. Note the line ending differences in my screenshot of the compare view. (left side is working file, right side is the index)

enter image description here

I've already configured Eclipse to handle whitespaces in the following areas:

  • Checked the checkbox in Windows > Preferences > Compare/Patch > Ignore white space (tells Eclipse not to mark whitespace differences in the Compare view)
  • Set core.autocrlf=true in Windows > Preferences > Team > Git > Configuration > User Settings and Windows > Preferences > Team > Git > Configuration > System Settings (tells EGit to ignore whitespaces properly, I think)

Now, the question is, why is my file still marked as dirty? Am I missing a step?

Additional Info

  • Our Git repository has CRLF line endings.
  • Salesforce has LF line endings.
  • 1
    This drives me absolutely insane, to say the least. – sfdcfox Jun 10 '15 at 20:59
  • @sfdcfox It really makes it difficult to see which files have actually been modified. If it helps, I've recently discovered converting line delimiters (File > Convert Line Delimiters To > Windows). I run it at the src folder level just after refreshing from sfdc. – jmrjulian Jun 10 '15 at 22:55
  • That's only half the problem. Tabs versus spaces, all sorts of whitespace issues because of different editors on different platforms. Even using the Developer Console results in a mess. I personally only pull one file at a time as I work on it, then commit in batches. I never pull from the src folder, which usually results in the entire tree being claimed as dirty. – sfdcfox Jun 10 '15 at 23:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.