| 4886 | } |
| 4887 | |
| 4888 | static int stopped_at_head(struct repository *r) |
| 4889 | { |
| 4890 | struct object_id head; |
| 4891 | struct commit *commit; |
| 4892 | struct commit_message message; |
| 4893 | |
| 4894 | if (repo_get_oid(r, "HEAD", &head) || |
| 4895 | !(commit = lookup_commit(r, &head)) || |
| 4896 | repo_parse_commit(r, commit) || get_message(commit, &message)) |
| 4897 | fprintf(stderr, _("Stopped at HEAD\n")); |
| 4898 | else { |
| 4899 | fprintf(stderr, _("Stopped at %s\n"), message.label); |
| 4900 | free_message(commit, &message); |
| 4901 | } |
| 4902 | return 0; |
| 4903 | |
| 4904 | } |
| 4905 | |
| 4906 | static int reread_todo_if_changed(struct repository *r, |
| 4907 | struct todo_list *todo_list, |
no test coverage detected