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

[JGIT PATCH] Paper bag fix 'jgit glog' handling of commit-ish arguments

From
Shawn O. Pearce <spearce@spearce.org>
Date
Aug 14, 2008, 23:26 UTC
Message-ID
<1218756363-27702-1-git-send-email-spearce@spearce.org>

When we parsed these arguments into RevCommit instances they were done against the wrong RevWalk instance. We parsed them into a generic RevWalk which has no plotting support, so the objects do not have the extra fields used by the plotting code. We need to lookup the commit from the PlotRevWalk and use those instances.

One of the calls (markStart) failed to use the secondary RevWalk instance, resulting in a ClassCastException during plotting.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
 .../org/spearce/jgit/pgm/RevWalkTextBuiltin.java   |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/RevWalkTextBuiltin.java b/org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/RevWalkTextBuiltin.java
index 97fe7a4..338af40 100644
--- a/org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/RevWalkTextBuiltin.java
+++ b/org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/RevWalkTextBuiltin.java
@@ -152,7 +152,7 @@ abstract class RevWalkTextBuiltin extends TextBuiltin {
 			if (c.has(RevFlag.UNINTERESTING))
 				walk.markUninteresting(real);
 			else
-				walk.markStart(c);
+				walk.markStart(real);
 		}
 
 		final long start = System.currentTimeMillis();
-- 
1.6.0.rc3.250.g8dd0
Message 1 of 1 in “Paper bag fix 'jgit glog' handling of commit-ish arguments”
  1. Paper bag fix 'jgit glog' handling of commit-ish argumentsShawn O. Pearce, Aug 14, 2008

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.