Skip to content

Commit a816ccd

Browse files
derrickstoleegitster
authored andcommitted
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 56e8bb4 (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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 61a22dd commit a816ccd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

builtin/fetch.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ static int git_fetch_config(const char *k, const char *v,
134134
int r = git_config_bool(k, v) ?
135135
RECURSE_SUBMODULES_ON : RECURSE_SUBMODULES_OFF;
136136
fetch_config->recurse_submodules = r;
137+
return 0;
137138
}
138139

139140
if (!strcmp(k, "submodule.fetchjobs")) {

0 commit comments

Comments
 (0)