use of org.eclipse.egit.core.internal.indexdiff.IndexDiffCache in project egit by eclipse.
the class IgnoreOperationUI method refresh.
private void refresh() {
Map<Repository, Collection<String>> pathsByRepository = ResourceUtil.splitPathsByRepository(paths);
for (Repository repository : pathsByRepository.keySet()) {
IndexDiffCache cache = org.eclipse.egit.core.Activator.getDefault().getIndexDiffCache();
IndexDiffCacheEntry entry = cache.getIndexDiffCacheEntry(repository);
if (entry != null)
entry.refresh();
}
GitLightweightDecorator.refresh();
}
use of org.eclipse.egit.core.internal.indexdiff.IndexDiffCache in project egit by eclipse.
the class PatchOperationUI method isWorkingTreeClean.
private boolean isWorkingTreeClean() {
IndexDiffCache diffCache = org.eclipse.egit.core.Activator.getDefault().getIndexDiffCache();
if (diffCache != null) {
IndexDiffCacheEntry diffCacheEntry = diffCache.getIndexDiffCacheEntry(repository);
if (diffCacheEntry == null) {
return true;
}
IndexDiffData diffData = diffCacheEntry.getIndexDiff();
if (diffData != null) {
Set<String> modified = diffData.getModified();
Set<String> untracked = diffData.getUntracked();
Set<String> missing = diffData.getMissing();
for (IResource resource : resources) {
String repoRelativePath = makeRepoRelative(resource);
if (containsPrefix(modified, repoRelativePath))
return false;
if (containsPrefix(untracked, repoRelativePath))
return false;
if (containsPrefix(missing, repoRelativePath))
return false;
}
}
}
return true;
}
Aggregations