| 2571 | } |
| 2572 | |
| 2573 | static int add_pending_commit(const char *arg, struct rev_info *revs, int flags) |
| 2574 | { |
| 2575 | struct object_id oid; |
| 2576 | if (repo_get_oid(the_repository, arg, &oid) == 0) { |
| 2577 | struct commit *commit = lookup_commit_reference(the_repository, |
| 2578 | &oid); |
| 2579 | if (commit) { |
| 2580 | commit->object.flags |= flags; |
| 2581 | add_pending_object(revs, &commit->object, arg); |
| 2582 | return 0; |
| 2583 | } |
| 2584 | } |
| 2585 | return -1; |
| 2586 | } |
| 2587 | |
| 2588 | static const char * const cherry_usage[] = { |
| 2589 | N_("git cherry [-v] [<upstream> [<head> [<limit>]]]"), |
no test coverage detected