]> git.ipfire.org Git - thirdparty/git.git/blobdiff - revision.c
Merge branch 'sb/object-store-lookup'
[thirdparty/git.git] / revision.c
index 8a2b2850cad2c081136e022f9f52ce5df67777af..8bd2e27037d8136ec96d31ed1a41eb45a040e475 100644 (file)
@@ -63,10 +63,10 @@ static void mark_tree_contents_uninteresting(struct tree *tree)
        while (tree_entry(&desc, &entry)) {
                switch (object_type(entry.mode)) {
                case OBJ_TREE:
-                       mark_tree_uninteresting(lookup_tree(entry.oid));
+                       mark_tree_uninteresting(lookup_tree(the_repository, entry.oid));
                        break;
                case OBJ_BLOB:
-                       mark_blob_uninteresting(lookup_blob(entry.oid));
+                       mark_blob_uninteresting(lookup_blob(the_repository, entry.oid));
                        break;
                default:
                        /* Subproject commit - not in this repository */
@@ -175,6 +175,7 @@ static void add_pending_object_with_path(struct rev_info *revs,
                strbuf_release(&buf);
                return; /* do not add the commit itself */
        }
+       obj->flags |= USER_GIVEN;
        add_object_array_with_path(obj, name, &revs->pending, mode, path);
 }
 
@@ -1322,7 +1323,7 @@ static void add_cache_tree(struct cache_tree *it, struct rev_info *revs,
        int i;
 
        if (it->entry_count >= 0) {
-               struct tree *tree = lookup_tree(&it->oid);
+               struct tree *tree = lookup_tree(the_repository, &it->oid);
                add_pending_object_with_path(revs, &tree->object, "",
                                             040000, path->buf);
        }
@@ -1348,7 +1349,7 @@ static void do_add_index_objects_to_pending(struct rev_info *revs,
                if (S_ISGITLINK(ce->ce_mode))
                        continue;
 
-               blob = lookup_blob(&ce->oid);
+               blob = lookup_blob(the_repository, &ce->oid);
                if (!blob)
                        die("unable to add index blob to traversal");
                add_pending_object_with_path(revs, &blob->object, "",
@@ -1591,8 +1592,8 @@ static int handle_dotdot_1(const char *arg, char *dotdot,
                struct commit *a, *b;
                struct commit_list *exclude;
 
-               a = lookup_commit_reference(&a_obj->oid);
-               b = lookup_commit_reference(&b_obj->oid);
+               a = lookup_commit_reference(the_repository, &a_obj->oid);
+               b = lookup_commit_reference(the_repository, &b_obj->oid);
                if (!a || !b)
                        return dotdot_missing(arg, dotdot, revs, symmetric);