Merge branch 'ao/config-from-gitmodules'
Tighten the API to make it harder to misuse in-tree .gitmodules file, even though it shares the same syntax with configuration files, to read random configuration items from it. * ao/config-from-gitmodules: submodule-config: reuse config_from_gitmodules in repo_read_gitmodules submodule-config: pass repository as argument to config_from_gitmodules submodule-config: make 'config_from_gitmodules' private submodule-config: add helper to get 'update-clone' config from .gitmodules submodule-config: add helper function to get 'fetch' config from .gitmodules config: move config_from_gitmodules to submodule-config.c
This commit is contained in:
@ -1708,8 +1708,8 @@ static int update_clone_task_finished(int result,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int gitmodules_update_clone_config(const char *var, const char *value,
|
||||
void *cb)
|
||||
static int git_update_clone_config(const char *var, const char *value,
|
||||
void *cb)
|
||||
{
|
||||
int *max_jobs = cb;
|
||||
if (!strcmp(var, "submodule.fetchjobs"))
|
||||
@ -1759,8 +1759,8 @@ static int update_clone(int argc, const char **argv, const char *prefix)
|
||||
};
|
||||
suc.prefix = prefix;
|
||||
|
||||
config_from_gitmodules(gitmodules_update_clone_config, &max_jobs);
|
||||
git_config(gitmodules_update_clone_config, &max_jobs);
|
||||
update_clone_config_from_gitmodules(&max_jobs);
|
||||
git_config(git_update_clone_config, &max_jobs);
|
||||
|
||||
argc = parse_options(argc, argv, prefix, module_update_clone_options,
|
||||
git_submodule_helper_usage, 0);
|
||||
|
Reference in New Issue
Block a user