commit: add repository argument to lookup_commit_reference
[gitweb.git] / builtin / diff-tree.c
index 473615117e0adbb301e6ddc0ab000accc513a9ee..a5718d96ee2c5304ed19fe633c7fdd86dc18ec8e 100644 (file)
@@ -5,12 +5,13 @@
 #include "log-tree.h"
 #include "builtin.h"
 #include "submodule.h"
+#include "repository.h"
 
 static struct rev_info log_tree_opt;
 
 static int diff_tree_commit_oid(const struct object_id *oid)
 {
-       struct commit *commit = lookup_commit_reference(oid);
+       struct commit *commit = lookup_commit_reference(the_repository, oid);
        if (!commit)
                return -1;
        return log_tree_commit(&log_tree_opt, commit);
@@ -45,7 +46,7 @@ static int stdin_diff_trees(struct tree *tree1, const char *p)
        struct tree *tree2;
        if (!isspace(*p++) || parse_oid_hex(p, &oid, &p) || *p)
                return error("Need exactly two trees, separated by a space");
-       tree2 = lookup_tree(&oid);
+       tree2 = lookup_tree(the_repository, &oid);
        if (!tree2 || parse_tree(tree2))
                return -1;
        printf("%s %s\n", oid_to_hex(&tree1->object.oid),
@@ -68,7 +69,7 @@ static int diff_tree_stdin(char *line)
        line[len-1] = 0;
        if (parse_oid_hex(line, &oid, &p))
                return -1;
-       obj = parse_object(&oid);
+       obj = parse_object(the_repository, &oid);
        if (!obj)
                return -1;
        if (obj->type == OBJ_COMMIT)