mirror of
https://github.com/git/git.git
synced 2026-08-07 16:42:02 +00:00
setup: stop using the_repository in verify_filename()
Stop using `the_repository` in `verify_filename()` and instead accept the repository as a parameter. The injection of `the_repository` is thus bumped one level higher, where callers now pass it in explicitly. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
e6a380201e
commit
6e7e50cc7b
5
setup.c
5
setup.c
@@ -280,7 +280,8 @@ static int looks_like_pathspec(const char *arg)
|
||||
* diagnose_misspelt_rev == 0 for the next ones (because we already
|
||||
* saw a filename, there's not ambiguity anymore).
|
||||
*/
|
||||
void verify_filename(const char *prefix,
|
||||
void verify_filename(struct repository *repo,
|
||||
const char *prefix,
|
||||
const char *arg,
|
||||
int diagnose_misspelt_rev)
|
||||
{
|
||||
@@ -288,7 +289,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(the_repository, prefix, arg, diagnose_misspelt_rev);
|
||||
die_verify_filename(repo, prefix, arg, diagnose_misspelt_rev);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user