rollback_packed_refs(): take a `packed_ref_store *` parameter
[gitweb.git] / builtin / reset.c
index 0be52fa36af414227a0069e50f7901640ade94d0..c782739c216004a61f5599e2b5d03e9ca2dafb61 100644 (file)
@@ -84,7 +84,7 @@ static int reset_index(const struct object_id *oid, int reset_type, int quiet)
                return -1;
 
        if (reset_type == MIXED || reset_type == HARD) {
-               tree = parse_tree_indirect(oid->hash);
+               tree = parse_tree_indirect(oid);
                prime_cache_tree(&the_index, tree);
        }
 
@@ -154,7 +154,7 @@ static int read_from_tree(const struct pathspec *pathspec,
        opt.format_callback = update_index_from_diff;
        opt.format_callback_data = &intent_to_add;
 
-       if (do_diff_cache(tree_oid->hash, &opt))
+       if (do_diff_cache(tree_oid, &opt))
                return 1;
        diffcore_std(&opt);
        diff_flush(&opt);
@@ -311,7 +311,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
                struct tree *tree;
                if (get_sha1_treeish(rev, oid.hash))
                        die(_("Failed to resolve '%s' as a valid tree."), rev);
-               tree = parse_tree_indirect(oid.hash);
+               tree = parse_tree_indirect(&oid);
                if (!tree)
                        die(_("Could not parse object '%s'."), rev);
                oidcpy(&oid, &tree->object.oid);