From 740ee055c6178fc2dd43c5ccfbd367c4c64d6e0d Mon Sep 17 00:00:00 2001
From: "brian m. carlson" <sandals@crustytoothpaste.net>
Date: Sat, 6 May 2017 22:10:17 +0000
Subject: Convert lookup_tree to struct object_id

Convert the lookup_tree function to take a pointer to struct object_id.

The commit was created with manual changes to tree.c, tree.h, and
object.c, plus the following semantic patch:

@@
@@
- lookup_tree(EMPTY_TREE_SHA1_BIN)
+ lookup_tree(&empty_tree_oid)

@@
expression E1;
@@
- lookup_tree(E1.hash)
+ lookup_tree(&E1)

@@
expression E1;
@@
- lookup_tree(E1->hash)
+ lookup_tree(E1)

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 walker.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'walker.c')

diff --git a/walker.c b/walker.c
index 3d6029c8e2..eae9fb974f 100644
--- a/walker.c
+++ b/walker.c
@@ -47,7 +47,7 @@ static int process_tree(struct walker *walker, struct tree *tree)
 		if (S_ISGITLINK(entry.mode))
 			continue;
 		if (S_ISDIR(entry.mode)) {
-			struct tree *tree = lookup_tree(entry.oid->hash);
+			struct tree *tree = lookup_tree(entry.oid);
 			if (tree)
 				obj = &tree->object;
 		}
-- 
cgit v1.2.1