Skip to contentSkip to conversation

Detect resource changes.

PATCH New Robin Rosenberg 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Detect resource changes.

Another oops from the patch to use git ordering in trees.

---

 .../spearce/egit/core/project/GitProjectData.java  |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
org.spearce.egit.core/src/org/spearce/egit/core/project/GitProjectData.java +3 -2
index 00d5186..431e0c4 100644
@@ -387,7 +387,8 @@ public class GitProjectData {
 				public boolean visit(final IResourceDelta d)
 						throws CoreException {
 					final int f = d.getFlags();
-					IResource r = d.getResource();
+					IResource res = d.getResource();
+					IResource r = res;
 					if ((f & IResourceDelta.CONTENT) != 0
 							|| (f & IResourceDelta.ENCODING) != 0
 							|| r instanceof IContainer) {
@@ -420,7 +421,7 @@ public class GitProjectData {
 							try {
 								synchronized (cacheTree) {
 									final TreeEntry e;
-									if (r.getType() == IResource.FILE)
+									if (res.getType() == IResource.FILE)
 										e = cacheTree.findBlobMember(s);
 									else
 										e = cacheTree.findTreeMember(s);