git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Robin Rosenberg <robin.rosenberg@dewire.com>
Date
Dec 3, 2006, 00:45 UTC
Message-ID
<200612030145.45567.robin.rosenberg@dewire.com>
This made the eclipse plugin unable to connect to Git.
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
---
 .../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
Next: Shawn Pearce
Message 1 of 2 in “Oops, get the commit first, then the tree.”
  1. Oops, get the commit first, then the tree.Robin Rosenberg, Dec 3, 2006
  2. Shawn PearceDec 3, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.