MCPcopy Index your code
hub / github.com/git/git / include_condition_is_true

Function include_condition_is_true

config.c:396–414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

394}
395
396static int include_condition_is_true(const struct key_value_info *kvi,
397 struct config_include_data *inc,
398 const char *cond, size_t cond_len)
399{
400 const struct config_options *opts = inc->opts;
401
402 if (skip_prefix_mem(cond, cond_len, "gitdir:", &cond, &cond_len))
403 return include_by_gitdir(kvi, opts, cond, cond_len, 0);
404 else if (skip_prefix_mem(cond, cond_len, "gitdir/i:", &cond, &cond_len))
405 return include_by_gitdir(kvi, opts, cond, cond_len, 1);
406 else if (skip_prefix_mem(cond, cond_len, "onbranch:", &cond, &cond_len))
407 return include_by_branch(inc, cond, cond_len);
408 else if (skip_prefix_mem(cond, cond_len, "hasconfig:remote.*.url:", &cond,
409 &cond_len))
410 return include_by_remote_url(inc, cond, cond_len);
411
412 /* unknown conditionals are always false */
413 return 0;
414}
415
416static int git_config_include(const char *var, const char *value,
417 const struct config_context *ctx,

Callers 1

git_config_includeFunction · 0.85

Calls 4

skip_prefix_memFunction · 0.85
include_by_gitdirFunction · 0.85
include_by_branchFunction · 0.85
include_by_remote_urlFunction · 0.85

Tested by

no test coverage detected