diff options
Diffstat (limited to 'reachable.c')
-rw-r--r-- | reachable.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/reachable.c b/reachable.c index c62efbfd43..6e9b810d2a 100644 --- a/reachable.c +++ b/reachable.c @@ -9,6 +9,9 @@ #include "cache-tree.h" #include "progress.h" #include "list-objects.h" +#include "packfile.h" +#include "worktree.h" +#include "object-store.h" struct connectivity_progress { struct progress *progress; @@ -75,7 +78,7 @@ static void add_recent_object(const struct object_id *oid, * later processing, and the revision machinery expects * commits and tags to have been parsed. */ - type = sha1_object_info(oid->hash, NULL); + type = oid_object_info(the_repository, oid, NULL); if (type < 0) die("unable to get object info for %s", oid_to_hex(oid)); @@ -85,14 +88,14 @@ static void add_recent_object(const struct object_id *oid, obj = parse_object_or_die(oid, NULL); break; case OBJ_TREE: - obj = (struct object *)lookup_tree(oid); + obj = (struct object *)lookup_tree(the_repository, oid); break; case OBJ_BLOB: - obj = (struct object *)lookup_blob(oid); + obj = (struct object *)lookup_blob(the_repository, oid); break; default: die("unknown object type for %s: %s", - oid_to_hex(oid), typename(type)); + oid_to_hex(oid), type_name(type)); } if (!obj) @@ -105,7 +108,7 @@ static int add_recent_loose(const struct object_id *oid, const char *path, void *data) { struct stat st; - struct object *obj = lookup_object(oid->hash); + struct object *obj = lookup_object(the_repository, oid->hash); if (obj && obj->flags & SEEN) return 0; @@ -130,7 +133,7 @@ static int add_recent_packed(const struct object_id *oid, struct packed_git *p, uint32_t pos, void *data) { - struct object *obj = lookup_object(oid->hash); + struct object *obj = lookup_object(the_repository, oid->hash); if (obj && obj->flags & SEEN) return 0; @@ -176,6 +179,7 @@ void mark_reachable_objects(struct rev_info *revs, int mark_reflog, /* detached HEAD is not included in the list above */ head_ref(add_one_ref, revs); + other_head_refs(add_one_ref, revs); /* Add all reflog info */ if (mark_reflog) |