]> git.ipfire.org Git - thirdparty/git.git/blobdiff - blame.c
object: allow create_object to handle arbitrary repositories
[thirdparty/git.git] / blame.c
diff --git a/blame.c b/blame.c
index 78c9808bd1a04a4c641b0f5f853540ea7618a522..ba9b18e7542b225316e8a5739e88ac3700784d7b 100644 (file)
--- a/blame.c
+++ b/blame.c
@@ -81,7 +81,7 @@ static void verify_working_tree_path(struct commit *work_tree, const char *path)
                unsigned mode;
 
                if (!get_tree_entry(commit_oid, path, &blob_oid, &mode) &&
-                   oid_object_info(&blob_oid, NULL) == OBJ_BLOB)
+                   oid_object_info(the_repository, &blob_oid, NULL) == OBJ_BLOB)
                        return;
        }
 
@@ -161,7 +161,7 @@ static struct commit *fake_working_tree_commit(struct diff_options *opt,
 
        read_cache();
        time(&now);
-       commit = alloc_commit_node();
+       commit = alloc_commit_node(the_repository);
        commit->object.parsed = 1;
        commit->date = now;
        parent_tail = &commit->parents;
@@ -504,7 +504,7 @@ static int fill_blob_sha1_and_mode(struct blame_origin *origin)
                return 0;
        if (get_tree_entry(&origin->commit->object.oid, origin->path, &origin->blob_oid, &origin->mode))
                goto error_out;
-       if (oid_object_info(&origin->blob_oid, NULL) != OBJ_BLOB)
+       if (oid_object_info(the_repository, &origin->blob_oid, NULL) != OBJ_BLOB)
                goto error_out;
        return 0;
  error_out: