Merge branch 'nd/tree-walk-with-repo'
[gitweb.git] / builtin / reset.c
index c2bb35a4b7048c94f79057ed3db4cbdd30a28504..fdd572168b51cc388a098008c3636ffa60856233 100644 (file)
@@ -79,13 +79,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 + nr, &head_oid))
+               if (!fill_tree_descriptor(the_repository, desc + nr, &head_oid))
                        return error(_("Failed to find tree of HEAD."));
                nr++;
                opts.fn = twoway_merge;
        }
 
-       if (!fill_tree_descriptor(desc + nr, oid)) {
+       if (!fill_tree_descriptor(the_repository, desc + nr, oid)) {
                error(_("Failed to find tree of %s."), oid_to_hex(oid));
                goto out;
        }