submodule-config.h: move check_submodule_url
Move 'check_submodule_url' out of 'fsck.c' and into 'submodule-config.h' as a public method, similar to 'check_submodule_name'. With the function now accessible outside of 'fsck', it can be used in a later commit to extend 'test-tool submodule' to check the validity of submodule URLs as it does with names in the 'check-name' subcommand. Other than its location, no changes are made to 'check_submodule_url' in this patch. Signed-off-by: Victoria Dye <vdye@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
564d0252ca
commit
13320ff610
@ -91,6 +91,9 @@ int config_set_in_gitmodules_file_gently(const char *key, const char *value);
|
||||
*/
|
||||
int check_submodule_name(const char *name);
|
||||
|
||||
/* Returns 0 if the URL valid per RFC3986 and -1 otherwise. */
|
||||
int check_submodule_url(const char *url);
|
||||
|
||||
/*
|
||||
* Note: these helper functions exist solely to maintain backward
|
||||
* compatibility with 'fetch' and 'update_clone' storing configuration in
|
||||
|
||||
Reference in New Issue
Block a user