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

Function die_on_missing_branch

remote.c:241–249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239}
240
241static void die_on_missing_branch(struct repository *repo,
242 struct branch *branch)
243{
244 /* branch == NULL is always valid because it represents detached HEAD. */
245 if (branch &&
246 branch != find_branch(repo->remote_state, branch->name,
247 strlen(branch->name)))
248 die("branch %s was not found in the repository", branch->name);
249}
250
251static struct branch *make_branch(struct remote_state *remote_state,
252 const char *name, size_t len)

Callers 4

remote_for_branchFunction · 0.85
pushremote_for_branchFunction · 0.85
remote_ref_for_branchFunction · 0.85
branch_get_pushFunction · 0.85

Calls 2

find_branchFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected