{"thread":{"id":"19164","subject":"[EGIT PATCH 1/1] Micro optimise getting ignored status of a resource","startedAt":"2009-05-03T08:41:56Z","lastAt":"2009-05-03T08:41:56Z","messageCount":1,"participants":["Ferry Huberts"],"isPatch":true,"patchVersion":1,"patchTotal":1},"messages":[{"id":"112913","messageId":"9850c6445ac62a8ed8c76282b07f8a2cf8064e8f.1241339812.git.ferry.huberts@pelagic.nl","threadId":"19164","inReplyTo":null,"subject":"[EGIT PATCH 1/1] Micro optimise getting ignored status of a resource","fromName":"Ferry Huberts","fromEmail":"ferry.huberts@pelagic.nl","sentAt":"2009-05-03T08:41:56Z","receivedAt":"2009-05-03T08:41:56Z","isPatch":true,"sender":{"key":"ferry.huberts@pelagic.nl","avatar":"https://gravatar.com/avatar/9f63c0289ad23cbdef0f7609a0af85ff0f4b3babfd066de9ff58f62d48cfd6f2?d=mp&s=160"},"body":"Do not evaluate getting the ignored status of a resource twice\nwhen once is enough.\n\nSigned-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>\n---\n .../org/spearce/egit/core/op/TrackOperation.java   |    5 +++--\n 1 files changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/org.spearce.egit.core/src/org/spearce/egit/core/op/TrackOperation.java b/org.spearce.egit.core/src/org/spearce/egit/core/op/TrackOperation.java\nindex 29b4344..5f80698 100644\n--- a/org.spearce.egit.core/src/org/spearce/egit/core/op/TrackOperation.java\n+++ b/org.spearce.egit.core/src/org/spearce/egit/core/op/TrackOperation.java\n@@ -94,14 +94,15 @@ public boolean visit(IResource resource) throws CoreException {\n \t\t\t\t\t\t\t\t\t// first. If a resource within a ignored folder is marked\n \t\t\t\t\t\t\t\t\t// we ignore it here, i.e. there is no way to unmark it expect\n \t\t\t\t\t\t\t\t\t// by explicitly selecting and invoking track on it.\n+\t\t\t\t\t\t\t\t\tboolean isIgnored = Team.isIgnoredHint(resource);\n \t\t\t\t\t\t\t\t\tif (resource.getType() == IResource.FILE) {\n \t\t\t\t\t\t\t\t\t\tEntry entry = index.getEntry(repoPath);\n-\t\t\t\t\t\t\t\t\t\tif (!Team.isIgnoredHint(resource) || entry != null && entry.isAssumedValid()) {\n+\t\t\t\t\t\t\t\t\t\tif (!isIgnored || entry != null && entry.isAssumedValid()) {\n \t\t\t\t\t\t\t\t\t\t\tentry = index.add(rm.getWorkDir(), new File(rm.getWorkDir(), repoPath));\n \t\t\t\t\t\t\t\t\t\t\tentry.setAssumeValid(false);\n \t\t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\t}\n-\t\t\t\t\t\t\t\t\tif (Team.isIgnoredHint(resource))\n+\t\t\t\t\t\t\t\t\tif (isIgnored)\n \t\t\t\t\t\t\t\t\t\treturn false;\n \n \t\t\t\t\t\t\t\t} catch (IOException e) {\n-- \n1.6.0.6\n"}]}