| 87 | } |
| 88 | |
| 89 | int parse_opt_commits(const struct option *opt, const char *arg, int unset) |
| 90 | { |
| 91 | struct object_id oid; |
| 92 | struct commit *commit; |
| 93 | |
| 94 | BUG_ON_OPT_NEG(unset); |
| 95 | |
| 96 | if (!arg) |
| 97 | return -1; |
| 98 | if (repo_get_oid(the_repository, arg, &oid)) |
| 99 | return error("malformed object name %s", arg); |
| 100 | commit = lookup_commit_reference(the_repository, &oid); |
| 101 | if (!commit) |
| 102 | return error("no such commit %s", arg); |
| 103 | commit_list_insert(commit, opt->value); |
| 104 | return 0; |
| 105 | } |
| 106 | |
| 107 | int parse_opt_commit(const struct option *opt, const char *arg, int unset) |
| 108 | { |
nothing calls this directly
no test coverage detected