Merge branch 'pb/trailers-from-command-line'
[gitweb.git] / builtin / reset.c
index 046403ed6881f452271c636e935ad3ab05da0b78..4a02d740739d53f986537969128738acf3cb4de7 100644 (file)
@@ -75,13 +75,13 @@ static int reset_index(const struct object_id *oid, int reset_type, int quiet)
                struct object_id head_oid;
                if (get_oid("HEAD", &head_oid))
                        return error(_("You do not have a valid HEAD."));
-               if (!fill_tree_descriptor(desc, head_oid.hash))
+               if (!fill_tree_descriptor(desc, &head_oid))
                        return error(_("Failed to find tree of HEAD."));
                nr++;
                opts.fn = twoway_merge;
        }
 
-       if (!fill_tree_descriptor(desc + nr - 1, oid->hash))
+       if (!fill_tree_descriptor(desc + nr - 1, oid))
                return error(_("Failed to find tree of %s."), oid_to_hex(oid));
        if (unpack_trees(nr, desc, &opts))
                return -1;