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

Function remotes_remote_for_branch

remote.c:666–680  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

664#endif /* WITH_BREAKING_CHANGES */
665
666static const char *remotes_remote_for_branch(struct remote_state *remote_state,
667 struct branch *branch,
668 int *explicit)
669{
670 if (branch && branch->remote_name) {
671 if (explicit)
672 *explicit = 1;
673 return branch->remote_name;
674 }
675 if (explicit)
676 *explicit = 0;
677 if (remote_state->remotes_nr == 1)
678 return remote_state->remotes[0]->name;
679 return "origin";
680}
681
682const char *remote_for_branch(struct branch *branch, int *explicit)
683{

Callers 3

remote_for_branchFunction · 0.85
repo_default_remoteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected