commit: add repository argument to lookup_commit_reference
[gitweb.git] / builtin / branch.c
index 1876ca9e7969019e1db1c97aedcf1064903b80a2..a50632fb23f52e3bad6de8a8e225498f4071fc58 100644 (file)
@@ -121,7 +121,8 @@ static int branch_merged(int kind, const char *name,
                    (reference_name = reference_name_to_free =
                     resolve_refdup(upstream, RESOLVE_REF_READING,
                                    &oid, NULL)) != NULL)
-                       reference_rev = lookup_commit_reference(&oid);
+                       reference_rev = lookup_commit_reference(the_repository,
+                                                               &oid);
        }
        if (!reference_rev)
                reference_rev = head_rev;
@@ -154,7 +155,7 @@ static int check_branch_commit(const char *branchname, const char *refname,
                               const struct object_id *oid, struct commit *head_rev,
                               int kinds, int force)
 {
-       struct commit *rev = lookup_commit_reference(oid);
+       struct commit *rev = lookup_commit_reference(the_repository, oid);
        if (!rev) {
                error(_("Couldn't look up commit object for '%s'"), refname);
                return -1;
@@ -208,7 +209,7 @@ static int delete_branches(int argc, const char **argv, int force, int kinds,
        }
 
        if (!force) {
-               head_rev = lookup_commit_reference(&head_oid);
+               head_rev = lookup_commit_reference(the_repository, &head_oid);
                if (!head_rev)
                        die(_("Couldn't look up commit object for HEAD"));
        }