13

I started using EGit with eclipse and one of my directories (which contains many submodules and regular directories) always shows as dirty. I have tried to git reset --hard and re-create the project from scratch. If I select the directory and Compare With git index or HEAD, it does not show any changes.

If I use git on the command line for the folder, git status does not show any pending changes and git submodule lists all the submodules correctly. Using EGit, I tried to set the Assume Unhanged option. But this propagates to child directories too (which isn't desirable).

I am using Eclipse 4.2.1, EGit 2.1.0, and Geppetto 3.0.0. What else could cause this directory to always show as dirty? Any way to just ignore changes to this directory (but still changes to the siblings)?

Update - Oct 2nd, 2013:

Update - Sept 24th, 2014:

  • There is an additional umbrella bug at https://bugs.eclipse.org/bugs/show_bug.cgi?id=429304 that can be followed for the issue specific to EGit.
  • I no longer use Eclipse or EGit and have moved to Atom with the Git Plus plugin. I will try and continue to update this when the issue is fixed. But Atom and Git Plus satisfy me much better now and this issue isn't relevant to me at the moment.
Andy Shinn
  • 26,561
  • 8
  • 75
  • 93
  • Sounds like a bug, could you report [here](https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EGit) please? – robinst Oct 04 '12 at 19:42
  • 1
    Sure, I opened bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=391280 – Andy Shinn Oct 06 '12 at 00:09
  • 1
    This is still a bug, after all this time ... – Marek Sebera Mar 01 '13 at 03:50
  • 1
    it's a feature (I commented on the issue). Assume unchanged only applies to files. Setting it on a folder applies to all *tracked* files within that folder structure. If you choose to ignore the untracked files the folder should not be marked dirty. – robinr Mar 07 '13 at 10:49
  • @robinr your comment is not relevant to the reported bug. The bug reported here and at #391280 is not about AssumeUnchanged. It is about submodules being checked out with the wrong mode, 100644 instead of 120000. – Phil Hord Oct 03 '13 at 20:15

2 Answers2

1

It could also be due to differences in line-endings between the multiple people who have pushed to the remote repo, the remote repo (usually bare, but OS-specific line-endings), and your git settings. Is this something that you can verify?

  • A line ending issue is visible on files as well as projects (even with EGit). The problem described here is that Andy Shinn can't locte the source of the showed changes in the repository. This is probably not due to line ending issue. – Antwane Jun 21 '14 at 07:58
-1

This workaround fixed it for me. Mark the parent folder with "Assume Unchanged", but mark all subfolders with "No Assumed Unchanged".

For example, I added a submodule to modules/Services under my project root. I marked modules with "Assume Unchanged" which removed the dirty flag. I then marked all subfolders (modules/Entity, modules/Services, ...) with "No Assume Unchanged".

Team -> Advanced -> "Assume Unchanged" / "No Assumed Unchanged"

I don't think this is perfect, if I had individual files under modules, they probably would not show as dirty if modified.

atodd
  • 321
  • 3
  • 10
  • 2
    This is extremely dangerous advice, marking a parent folder as "Assume Unchanged" means you could forget to commit vital work. PLEASE IGNORE – Ricardo Gladwell Feb 11 '14 at 13:43