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

Function find_branch

remote.c:224–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222}
223
224static struct branch *find_branch(struct remote_state *remote_state,
225 const char *name, size_t len)
226{
227 struct branches_hash_key lookup;
228 struct hashmap_entry lookup_entry, *e;
229
230 lookup.str = name;
231 lookup.len = len;
232 hashmap_entry_init(&lookup_entry, memhash(name, len));
233
234 e = hashmap_get(&remote_state->branches_hash, &lookup_entry, &lookup);
235 if (e)
236 return container_of(e, struct branch, ent);
237
238 return NULL;
239}
240
241static void die_on_missing_branch(struct repository *repo,
242 struct branch *branch)

Callers 2

die_on_missing_branchFunction · 0.85
make_branchFunction · 0.85

Calls 3

hashmap_entry_initFunction · 0.85
memhashFunction · 0.85
hashmap_getFunction · 0.85

Tested by

no test coverage detected