| 222 | } |
| 223 | |
| 224 | static 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 | |
| 241 | static void die_on_missing_branch(struct repository *repo, |
| 242 | struct branch *branch) |
no test coverage detected