Merge branch 'jk/sort-iter-test-output'
[gitweb.git] / builtin / reset.c
index 26ef9a7bd03ac8925e1cb350c49e5e327999ba52..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;
        }
@@ -421,7 +421,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
                        print_new_head_line(lookup_commit_reference(the_repository, &oid));
        }
        if (!pathspec.nr)
-               remove_branch_state(the_repository);
+               remove_branch_state(the_repository, 0);
 
        return update_ref_status;
 }