mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
submodule: factor out a config_set_in_gitmodules_file_gently function
Introduce a new config_set_in_gitmodules_file_gently() function to write config values to the .gitmodules file. This is in preparation for a future change which will use the function to write to the .gitmodules file in a more controlled way instead of using "git config -f .gitmodules". The purpose of the change is mainly to centralize the code that writes to the .gitmodules file to avoid some duplication. The naming follows git_config_set_in_file_gently() but the git_ prefix is removed to communicate that this is not a generic git-config API. Signed-off-by: Antonio Ospite <ao2@ao2.it> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
bcbc780d14
commit
45f5ef3d77
@@ -49,6 +49,7 @@ const struct submodule *submodule_from_path(struct repository *r,
|
||||
const char *path);
|
||||
void submodule_free(struct repository *r);
|
||||
int print_config_from_gitmodules(struct repository *repo, const char *key);
|
||||
int config_set_in_gitmodules_file_gently(const char *key, const char *value);
|
||||
|
||||
/*
|
||||
* Returns 0 if the name is syntactically acceptable as a submodule "name"
|
||||
|
||||
Reference in New Issue
Block a user