Merge branch 'en/t6042-insane-merge-rename-testcases'
[gitweb.git] / builtin / reset.c
index ffe41c924b4810d79872fb5faf600a47e19508e5..d9871e5b6c6f3f417baa7daa4d84d3b9bc9142a9 100644 (file)
@@ -319,7 +319,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
                struct commit *commit;
                if (get_oid_committish(rev, &oid))
                        die(_("Failed to resolve '%s' as a valid revision."), rev);
-               commit = lookup_commit_reference(&oid);
+               commit = lookup_commit_reference(the_repository, &oid);
                if (!commit)
                        die(_("Could not parse object '%s'."), rev);
                oidcpy(&oid, &commit->object.oid);
@@ -396,7 +396,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
                update_ref_status = reset_refs(rev, &oid);
 
                if (reset_type == HARD && !update_ref_status && !quiet)
-                       print_new_head_line(lookup_commit_reference(&oid));
+                       print_new_head_line(lookup_commit_reference(the_repository, &oid));
        }
        if (!pathspec.nr)
                remove_branch_state();