commit: add repository argument to lookup_commit
[gitweb.git] / tree.c
diff --git a/tree.c b/tree.c
index f31afb81be0292b4bf5eadcbc5ecb451e5fb69ab..45e89ff08ebdb57b0f3c501993741c7b01ccf32b 100644 (file)
--- a/tree.c
+++ b/tree.c
@@ -101,7 +101,7 @@ static int read_tree_1(struct tree *tree, struct strbuf *base,
                else if (S_ISGITLINK(entry.mode)) {
                        struct commit *commit;
 
-                       commit = lookup_commit(entry.oid);
+                       commit = lookup_commit(the_repository, entry.oid);
                        if (!commit)
                                die("Commit %s in submodule path %s%s not found",
                                    oid_to_hex(entry.oid),
@@ -120,7 +120,7 @@ static int read_tree_1(struct tree *tree, struct strbuf *base,
                len = tree_entry_len(&entry);
                strbuf_add(base, entry.path, len);
                strbuf_addch(base, '/');
-               retval = read_tree_1(lookup_tree(&oid),
+               retval = read_tree_1(lookup_tree(the_repository, &oid),
                                     base, stage, pathspec,
                                     fn, context);
                strbuf_setlen(base, oldlen);
@@ -195,7 +195,7 @@ int read_tree(struct tree *tree, int stage, struct pathspec *match,
        return 0;
 }
 
-struct tree *lookup_tree(const struct object_id *oid)
+struct tree *lookup_tree_the_repository(const struct object_id *oid)
 {
        struct object *obj = lookup_object(the_repository, oid->hash);
        if (!obj)