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

Function read_config

remote.c:630–650  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

628}
629
630static void read_config(struct repository *repo, int early)
631{
632 int flag;
633
634 if (repo->remote_state->initialized)
635 return;
636 repo->remote_state->initialized = 1;
637
638 repo->remote_state->current_branch = NULL;
639 if (startup_info->have_repository && !early) {
640 const char *head_ref = refs_resolve_ref_unsafe(
641 get_main_ref_store(repo), "HEAD", 0, NULL, &flag);
642 if (head_ref && (flag & REF_ISSYMREF) &&
643 skip_prefix(head_ref, "refs/heads/", &head_ref)) {
644 repo->remote_state->current_branch = make_branch(
645 repo->remote_state, head_ref, strlen(head_ref));
646 }
647 }
648 repo_config(repo, handle_config, repo->remote_state);
649 alias_all_urls(repo->remote_state);
650}
651
652#ifndef WITH_BREAKING_CHANGES
653static int valid_remote_nick(const char *name)

Callers 11

remote_for_branchFunction · 0.85
pushremote_for_branchFunction · 0.85
remote_ref_for_branchFunction · 0.85
remote_getFunction · 0.85
remote_get_earlyFunction · 0.85
pushremote_getFunction · 0.85
for_each_remoteFunction · 0.85
repo_branch_getFunction · 0.85
repo_default_remoteFunction · 0.85
repo_remote_from_urlFunction · 0.85
branch_get_pushFunction · 0.85

Calls 5

refs_resolve_ref_unsafeFunction · 0.85
get_main_ref_storeFunction · 0.85
make_branchFunction · 0.85
alias_all_urlsFunction · 0.85
repo_configFunction · 0.70

Tested by

no test coverage detected