From e270f42c4d26fca591ca89ea8ee08ff17a72c1b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Tue, 16 Apr 2019 16:33:39 +0700 Subject: sha1-name.c: remove the_repo from maybe_die_on_misspelt_object_name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- setup.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'setup.c') diff --git a/setup.c b/setup.c index d0c958c3b2..8dcb4631f7 100644 --- a/setup.c +++ b/setup.c @@ -164,7 +164,8 @@ int check_filename(const char *prefix, const char *arg) die_errno(_("failed to stat '%s'"), arg); } -static void NORETURN die_verify_filename(const char *prefix, +static void NORETURN die_verify_filename(struct repository *r, + const char *prefix, const char *arg, int diagnose_misspelt_rev) { @@ -179,7 +180,7 @@ static void NORETURN die_verify_filename(const char *prefix, * let maybe_die_on_misspelt_object_name() even trigger. */ if (!(arg[0] == ':' && !isalnum(arg[1]))) - maybe_die_on_misspelt_object_name(arg, prefix); + maybe_die_on_misspelt_object_name(r, arg, prefix); /* ... or fall back the most general message. */ die(_("ambiguous argument '%s': unknown revision or path not in the working tree.\n" @@ -234,7 +235,7 @@ void verify_filename(const char *prefix, die(_("option '%s' must come before non-option arguments"), arg); if (looks_like_pathspec(arg) || check_filename(prefix, arg)) return; - die_verify_filename(prefix, arg, diagnose_misspelt_rev); + die_verify_filename(the_repository, prefix, arg, diagnose_misspelt_rev); } /* -- cgit v1.2.3