pack-redundant: convert linked lists to use struct object_id
[gitweb.git] / sha1_name.c
index 509a95f0cfdcac749afd5d21469c9338025fedd7..7c2d08a202f1348dd84966d0d93b2748629892e3 100644 (file)
@@ -179,7 +179,6 @@ static void find_short_packed_object(struct disambiguate_state *ds)
 {
        struct packed_git *p;
 
-       prepare_packed_git();
        for (p = get_packed_git(the_repository); p && !ds->ambiguous;
             p = p->next)
                unique_in_pack(p, ds);
@@ -534,7 +533,6 @@ static void find_abbrev_len_packed(struct min_abbrev_data *mad)
 {
        struct packed_git *p;
 
-       prepare_packed_git();
        for (p = get_packed_git(the_repository); p; p = p->next)
                find_abbrev_len_for_pack(p, mad);
 }
@@ -1687,8 +1685,8 @@ static int get_oid_with_context_1(const char *name,
                        if (new_filename)
                                filename = new_filename;
                        if (flags & GET_OID_FOLLOW_SYMLINKS) {
-                               ret = get_tree_entry_follow_symlinks(tree_oid.hash,
-                                       filename, oid->hash, &oc->symlink_path,
+                               ret = get_tree_entry_follow_symlinks(&tree_oid,
+                                       filename, oid, &oc->symlink_path,
                                        &oc->mode);
                        } else {
                                ret = get_tree_entry(&tree_oid, filename, oid,
@@ -1700,7 +1698,6 @@ static int get_oid_with_context_1(const char *name,
                                                                   name, len);
                                }
                        }
-                       hashcpy(oc->tree, tree_oid.hash);
                        if (flags & GET_OID_RECORD_PATH)
                                oc->path = xstrdup(filename);