diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-04-06 22:38:28 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-04-06 22:38:29 +0200 |
commit | 87daf40750c9e344dd50495fdca1809aebcb1a94 (patch) | |
tree | 3f08482461e3484d5e77c7575c3fa35af28a33a4 /builtin/submodule--helper.c | |
parent | Merge branch 'ps/fetch-ref-update-reporting' (diff) | |
parent | for-each-repo: with bad config, don't conflate <path> and <cmd> (diff) | |
download | git-87daf40750c9e344dd50495fdca1809aebcb1a94.tar.xz git-87daf40750c9e344dd50495fdca1809aebcb1a94.zip |
Merge branch 'ab/config-multi-and-nonbool'
Assorted config API updates.
* ab/config-multi-and-nonbool:
for-each-repo: with bad config, don't conflate <path> and <cmd>
config API: add "string" version of *_value_multi(), fix segfaults
config API users: test for *_get_value_multi() segfaults
for-each-repo: error on bad --config
config API: have *_multi() return an "int" and take a "dest"
versioncmp.c: refactor config reading next commit
config API: add and use a "git_config_get()" family of functions
config tests: add "NULL" tests for *_get_value_multi()
config tests: cover blind spots in git_die_config() tests
Diffstat (limited to 'builtin/submodule--helper.c')
-rw-r--r-- | builtin/submodule--helper.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index 65a053261a..6cd807471e 100644 --- a/builtin/submodule--helper.c +++ b/builtin/submodule--helper.c @@ -559,7 +559,7 @@ static int module_init(int argc, const char **argv, const char *prefix) * If there are no path args and submodule.active is set then, * by default, only initialize 'active' modules. */ - if (!argc && git_config_get_value_multi("submodule.active")) + if (!argc && !git_config_get("submodule.active")) module_list_active(&list); info.prefix = prefix; @@ -2745,7 +2745,7 @@ static int module_update(int argc, const char **argv, const char *prefix) * If there are no path args and submodule.active is set then, * by default, only initialize 'active' modules. */ - if (!argc && git_config_get_value_multi("submodule.active")) + if (!argc && !git_config_get("submodule.active")) module_list_active(&list); info.prefix = opt.prefix; @@ -3142,7 +3142,6 @@ static int config_submodule_in_gitmodules(const char *name, const char *var, con static void configure_added_submodule(struct add_data *add_data) { char *key; - const char *val; struct child_process add_submod = CHILD_PROCESS_INIT; struct child_process add_gitmodules = CHILD_PROCESS_INIT; @@ -3187,7 +3186,7 @@ static void configure_added_submodule(struct add_data *add_data) * is_submodule_active(), since that function needs to find * out the value of "submodule.active" again anyway. */ - if (!git_config_get_string_tmp("submodule.active", &val)) { + if (!git_config_get("submodule.active")) { /* * If the submodule being added isn't already covered by the * current configured pathspec, set the submodule's active flag |