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@dewire.com>
---
.../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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Amit K. Arora | [RFC] Heads up on sys_fallocate() |
| Chuck Ebbert | Why do so many machines need "noapic"? |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Natalie Protasevich | [BUG] New Kernel Bugs |
