diff options
author | Brandon Williams <bmwill@google.com> | 2017-08-03 20:19:54 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-08-03 22:11:01 +0200 |
commit | 2cc67fe54a029842e71e49a676bf010e988d4063 (patch) | |
tree | 1bdaca71bd8a8f43ae7e6c7904a3d708319ea517 /submodule.c | |
parent | unpack-trees: don't respect submodule.update (diff) | |
download | git-2cc67fe54a029842e71e49a676bf010e988d4063.tar.xz git-2cc67fe54a029842e71e49a676bf010e988d4063.zip |
submodule: remove submodule_config callback routine
Remove the last remaining caller of 'submodule_config()' as well as the
function itself.
With 'submodule_config()' being removed the submodule-config API can be
a little simpler as callers don't need to worry about whether or not
they need to overlay the repository's config on top of the
submodule-config. This also makes it more difficult to accidentally
add non-submodule specific configuration to the .gitmodules file.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'submodule.c')
-rw-r--r-- | submodule.c | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/submodule.c b/submodule.c index f913c23415..3b383d8c41 100644 --- a/submodule.c +++ b/submodule.c @@ -180,27 +180,6 @@ void set_diffopt_flags_from_submodule_config(struct diff_options *diffopt, } } -/* For loading from the .gitmodules file. */ -static int git_modules_config(const char *var, const char *value, void *cb) -{ - if (starts_with(var, "submodule.")) - return parse_submodule_config_option(var, value); - return 0; -} - -/* Loads all submodule settings from the config. */ -int submodule_config(const char *var, const char *value, void *cb) -{ - if (!strcmp(var, "submodule.recurse")) { - int v = git_config_bool(var, value) ? - RECURSE_SUBMODULES_ON : RECURSE_SUBMODULES_OFF; - config_update_recurse_submodules = v; - return 0; - } else { - return git_modules_config(var, value, cb); - } -} - /* Cheap function that only determines if we're interested in submodules at all */ int git_default_submodule_config(const char *var, const char *value, void *cb) { @@ -271,8 +250,8 @@ void gitmodules_config_oid(const struct object_id *commit_oid) struct object_id oid; if (gitmodule_oid_from_commit(commit_oid, &oid, &rev)) { - git_config_from_blob_oid(submodule_config, rev.buf, - &oid, NULL); + git_config_from_blob_oid(gitmodules_cb, rev.buf, + &oid, the_repository); } strbuf_release(&rev); } |