MCPcopy Create free account
hub / github.com/git/git / get_fetch_recurse_config

Function get_fetch_recurse_config

submodule.c:1420–1443  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1418}
1419
1420static int get_fetch_recurse_config(const struct submodule *submodule,
1421 struct submodule_parallel_fetch *spf)
1422{
1423 if (spf->command_line_option != RECURSE_SUBMODULES_DEFAULT)
1424 return spf->command_line_option;
1425
1426 if (submodule) {
1427 char *key;
1428 const char *value;
1429
1430 int fetch_recurse = submodule->fetch_recurse;
1431 key = xstrfmt("submodule.%s.fetchRecurseSubmodules", submodule->name);
1432 if (!repo_config_get_string_tmp(spf->r, key, &value)) {
1433 fetch_recurse = parse_fetch_recurse_submodules_arg(key, value);
1434 }
1435 free(key);
1436
1437 if (fetch_recurse != RECURSE_SUBMODULES_NONE)
1438 /* local config overrules everything except commandline */
1439 return fetch_recurse;
1440 }
1441
1442 return spf->default_option;
1443}
1444
1445/*
1446 * Fetch in progress (if callback data) or

Callers 1

fetch_task_createFunction · 0.85

Calls 3

xstrfmtFunction · 0.85

Tested by

no test coverage detected