| 239 | } |
| 240 | |
| 241 | static 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 | |
| 251 | static struct branch *make_branch(struct remote_state *remote_state, |
| 252 | const char *name, size_t len) |
no test coverage detected