diff options
author | Derrick Stolee <stolee@gmail.com> | 2024-04-05 02:52:22 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-04-05 09:55:21 -0700 |
commit | a816ccd642247c0c1c8fd920f94bb4db1508ef14 (patch) | |
tree | 5c8ef4178c080b8fbd994d93bb83290186b89f1e | |
parent | 61a22ddaf0626111193a17ac12f366bd6d167dff (diff) | |
download | git-a816ccd642247c0c1c8fd920f94bb4db1508ef14.tar.gz |
fetch: return when parsing submodule.recurse
When parsing config keys, the normal pattern is to return 0 after
completing the logic for a specific config key, since no other key will
match. One instance, for "submodule.recurse", was missing this case in
builtin/fetch.c.
This is a very minor change, and will have minimal impact to
performance. This particular block was edited recently in 56e8bb4fb4
(fetch: use `fetch_config` to store "fetch.recurseSubmodules" value,
2023-05-17), which led to some hesitation that perhaps this omission was
on purpose.
However, no later cases within git_fetch_config() will match the key if
equal to "submodule.recurse" and neither will any key matches within the
catch-all git_default_config().
Signed-off-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | builtin/fetch.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c index eed4a7cdb6..38eb54bd9f 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -134,6 +134,7 @@ static int git_fetch_config(const char *k, const char *v, int r = git_config_bool(k, v) ? RECURSE_SUBMODULES_ON : RECURSE_SUBMODULES_OFF; fetch_config->recurse_submodules = r; + return 0; } if (!strcmp(k, "submodule.fetchjobs")) { |