[PATCH] Oops, get the commit first, then the tree.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This made the eclipse plugin unable to connect to Git.

Signed-off-by: Robin Rosenberg <robin.rosenberg@xxxxxxxxxx>
---
 .../src/org/spearce/jgit/lib/Repository.java       |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/Repository.java 
b/org.spearce.jgit/src/org/spearce/jgit/lib/Repository.java
index bfdcd3e..2344817 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/lib/Repository.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/Repository.java
@@ -168,7 +168,8 @@ public class Repository {
     }
 
     public Tree mapTree(final String revstr) throws IOException {
-	final ObjectId id = resolve(revstr);
+	Commit commit = mapCommit(revstr);
+	final ObjectId id = commit.getTreeId();
 	return id != null ? mapTree(id) : null;
     }
 
-- 
1.4.4.gf05d


-
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]