Compare didn't work at the project level when the project wasn't the same as the git working directory, i.e. egit itself. Signed-off-by: Robin Rosenberg <robin.rosenberg@xxxxxxxxxx> --- .../core/internal/mapping/GitFileRevision.java | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/org.spearce.egit.core/src/org/spearce/egit/core/internal/mapping/GitFileRevision.java b/org.spearce.egit.core/src/org/spearce/egit/core/internal/mapping/GitFileRevision.java index 7b726f7..def142f 100644 --- a/org.spearce.egit.core/src/org/spearce/egit/core/internal/mapping/GitFileRevision.java +++ b/org.spearce.egit.core/src/org/spearce/egit/core/internal/mapping/GitFileRevision.java @@ -150,9 +150,14 @@ public class GitFileRevision extends FileRevision { tree = repositoryMapping.getRepository().mapTree(getCommit().getTreeId()); String prefix = repositoryMapping.getSubset(); if (prefix != null) { - prefix = prefix + "/"; - String name = prefix + resource.getProjectRelativePath().toString(); - return tree.findMember(name); + String relPath = resource.getProjectRelativePath().toString(); + if (relPath.equals("")) + return tree; + else { + prefix = prefix + "/"; + String name = prefix + relPath; + return tree.findMember(name); + } } else return tree; } catch (IOException e) { - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html