RepositoriesViewLabelProvider: mark dirty submodules
commitccb233b1f564a97cf9e09660cdd8270195b1372d
authorThomas Wolf <thomas.wolf@paranor.ch>
Thu, 25 Feb 2016 07:36:13 +0000 (25 08:36 +0100)
committerThomas Wolf <thomas.wolf@paranor.ch>
Fri, 26 Feb 2016 06:10:40 +0000 (26 07:10 +0100)
treed6d8876b8a60571affbf9d07c4228ddbe5999646
parent5dc7ac99cb0b52ad87e2c563f5dfecf9a800e82c
RepositoriesViewLabelProvider: mark dirty submodules

Prepend the dirty indicator "> " to the text label if the submodule
has changes.

Requires that the RepositoryCache ensures that all repositories are
registered under their normalized git directory file name (normalized
meaning not containing . or .. components). The
RepositoriesViewContentProvider uses a SubmoduleWalk, and that returns
non-normalized paths, while the RepositoryMappings always use normalized
ones. That results in two different Repository instances for the same
git repository; listening for index diff changes on one won't trigger on
the other one, and thus labels in the repositories view wouldn't update.

Change-Id: Idf4002debdda94b35b278bff8194cde2ecba739c
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
org.eclipse.egit.core/src/org/eclipse/egit/core/RepositoryCache.java
org.eclipse.egit.core/src/org/eclipse/egit/core/RepositoryUtil.java
org.eclipse.egit.core/src/org/eclipse/egit/core/internal/indexdiff/IndexDiffData.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/GitLabels.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesViewLabelProvider.java