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

Re: [PATCH] First cut at libifying revlist generation

From
Linus Torvalds <torvalds@osdl.org>
Date
Feb 27, 2006, 03:05 UTC
Message-ID
<Pine.LNX.4.64.0602261900370.22647@g5.osdl.org>
In-Reply-To
<Pine.LNX.4.63.0602270257110.4147@wbgn013.biozentrum.uni-wuerzburg.de>
On Mon, 27 Feb 2006, Johannes Schindelin wrote:
Show 6 quoted lines
> 
> beware of that patch. It breaks at least one thing: cloning a repository 
> with a tag pointing to a tag object (the tag is cloned, but not the tag 
> object).
> 
> Sorry to not fix it right away, but I am just too tired.
Ahh. I know what it is.

I'm pretty sure this trivial and stupid patch on top of the patch I sent out should fix it.

Duh. I moved "pending_objects" into the "revs" structure, but didn't remove the stale one, along with its use.

		Linus
---
diff --git a/rev-list.c b/rev-list.c
index d1c52a6..e9e371c 100644
--- a/rev-list.c
+++ b/rev-list.c
@@ -214,8 +214,6 @@ static struct object_list **process_tree
 	return p;
 }
 
-static struct object_list *pending_objects = NULL;
-
 static void show_commit_list(struct commit_list *list)
 {
 	struct object_list *objects = NULL, **p = &objects, *pending;
@@ -226,7 +224,7 @@ static void show_commit_list(struct comm
 		if (process_commit(commit) == STOP)
 			break;
 	}
-	for (pending = pending_objects; pending; pending = pending->next) {
+	for (pending = revs.pending_objects; pending; pending = pending->next) {
 		struct object *obj = pending->item;
 		const char *name = pending->name;
 		if (obj->flags & (UNINTERESTING | SEEN))
Previous: Johannes SchindelinNext: Junio C Hamano
Message 4 of 12 in “First cut at libifying revlist generation”
  1. First cut at libifying revlist generationLinus Torvalds, Feb 26, 2006
  2. Junio C HamanoFeb 26, 2006
  3. Johannes SchindelinFeb 27, 2006
  4. Linus TorvaldsFeb 27, 2006
  5. Junio C HamanoFeb 27, 2006
  6. Linus TorvaldsFeb 27, 2006
  7. Junio C HamanoFeb 27, 2006
  8. Linus TorvaldsFeb 27, 2006
  9. Linus TorvaldsFeb 27, 2006
  10. Junio C HamanoFeb 27, 2006
  11. Johannes SchindelinFeb 27, 2006
  12. Junio C HamanoFeb 28, 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.