commit: add repository argument to lookup_commit_reference
[gitweb.git] / builtin / describe.c
index bec2513b66cea8e5b3c7bae5de2c2e0bd31aecc9..c8ff64766d04c9dad38dc8f2ccccb7c9ffecaa63 100644 (file)
@@ -13,6 +13,7 @@
 #include "hashmap.h"
 #include "argv-array.h"
 #include "run-command.h"
+#include "object-store.h"
 #include "revision.h"
 #include "list-objects.h"
 #include "commit-slab.h"
@@ -302,7 +303,7 @@ static void describe_commit(struct object_id *oid, struct strbuf *dst)
        unsigned long seen_commits = 0;
        unsigned int unannotated_cnt = 0;
 
-       cmit = lookup_commit_reference(oid);
+       cmit = lookup_commit_reference(the_repository, oid);
 
        n = find_commit_name(&cmit->object.oid);
        if (n && (tags || all || n->prio == 2)) {
@@ -330,7 +331,8 @@ static void describe_commit(struct object_id *oid, struct strbuf *dst)
                init_commit_names(&commit_names);
                n = hashmap_iter_first(&names, &iter);
                for (; n; n = hashmap_iter_next(&iter)) {
-                       c = lookup_commit_reference_gently(&n->peeled, 1);
+                       c = lookup_commit_reference_gently(the_repository,
+                                                          &n->peeled, 1);
                        if (c)
                                *commit_names_at(&commit_names, c) = n;
                }
@@ -508,7 +510,7 @@ static void describe(const char *arg, int last_one)
 
        if (get_oid(arg, &oid))
                die(_("Not a valid object name %s"), arg);
-       cmit = lookup_commit_reference_gently(&oid, 1);
+       cmit = lookup_commit_reference_gently(the_repository, &oid, 1);
 
        if (cmit)
                describe_commit(&oid, &sb);