From: Linus Torvalds <torvalds@osdl.org>
Date: Mon, 5 Jun 2006 18:44:36 +0000 (-0700)
Subject: rev-list: fix process_tree() conversion.
X-Git-Tag: v1.4.0-rc1~4
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=87cefaaff958e30204a21757012a46883175c00f;p=git

rev-list: fix process_tree() conversion.

The tree-walking conversion of the "process_tree()" function
broke packing by using an unrelated variable from outer scope.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---

diff --git a/builtin-rev-list.c b/builtin-rev-list.c
index 17c04b962d..e885624255 100644
--- a/builtin-rev-list.c
+++ b/builtin-rev-list.c
@@ -135,9 +135,9 @@ static struct object_list **process_tree(struct tree *tree,
 
 	while (tree_entry(&desc, &entry)) {
 		if (S_ISDIR(entry.mode))
-			p = process_tree(lookup_tree(entry.sha1), p, &me, name);
+			p = process_tree(lookup_tree(entry.sha1), p, &me, entry.path);
 		else
-			p = process_blob(lookup_blob(entry.sha1), p, &me, name);
+			p = process_blob(lookup_blob(entry.sha1), p, &me, entry.path);
 	}
 	free(tree->buffer);
 	tree->buffer = NULL;