sha1-name.c: remove the_repo from maybe_die_on_misspelt_object_name

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2019-04-16 16:33:39 +07:00
committed by Junio C Hamano
parent d9b8b8f896
commit e270f42c4d
3 changed files with 11 additions and 6 deletions

View File

@ -1885,11 +1885,13 @@ static enum get_oid_result get_oid_with_context_1(struct repository *repo,
* exist in 'HEAD'" when given "HEAD:doc", or it may return in which case
* you have a chance to diagnose the error further.
*/
void maybe_die_on_misspelt_object_name(const char *name, const char *prefix)
void maybe_die_on_misspelt_object_name(struct repository *r,
const char *name,
const char *prefix)
{
struct object_context oc;
struct object_id oid;
get_oid_with_context_1(the_repository, name, GET_OID_ONLY_TO_DIE,
get_oid_with_context_1(r, name, GET_OID_ONLY_TO_DIE,
prefix, &oid, &oc);
}