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

[JGIT PATCH] RevWalk: Fix RevSort.REVERSE combined with RevSort.TOPO

From
Shawn O. Pearce <spearce@spearce.org>
Date
Sep 7, 2008, 21:00 UTC
Message-ID
<1220821208-13420-1-git-send-email-spearce@spearce.org>
From: Shawn O. Pearce <sop@google.com>

The reverse sort was using the initial pending queue, not the generator that comes before it in the workflow. This caused a combination of TOPO and REVERSE to return no commits.

Signed-off-by: Shawn O. Pearce <sop@google.com>
---
 .../org/spearce/jgit/revwalk/StartGenerator.java   |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/org.spearce.jgit/src/org/spearce/jgit/revwalk/StartGenerator.java b/org.spearce.jgit/src/org/spearce/jgit/revwalk/StartGenerator.java
index 7ddcd3c..1b7947f 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/revwalk/StartGenerator.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/revwalk/StartGenerator.java
@@ -144,7 +144,7 @@ RevCommit next() throws MissingObjectException,
 				&& (g.outputType() & SORT_TOPO) == 0)
 			g = new TopoSortGenerator(g);
 		if (walker.hasRevSort(RevSort.REVERSE))
-			g = new LIFORevQueue(q);
+			g = new LIFORevQueue(g);
 		if (boundary)
 			g = new BoundaryGenerator(w, g);
 
-- 
1.6.0.1.319.g9f32b
Next: Shawn O. Pearce
Message 1 of 4 in “RevWalk: Fix RevSort.REVERSE combined with RevSort.TOPO”
  1. RevWalk: Fix RevSort.REVERSE combined with RevSort.TOPOShawn O. Pearce, Sep 7, 2008
  2. Shawn O. PearceSep 7, 2008
  3. Robin RosenbergSep 7, 2008
  4. Shawn O. PearceSep 7, 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.