MCPcopy Create free account
hub / github.com/git/git / add_pending_commit

Function add_pending_commit

builtin/log.c:2573–2586  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2571}
2572
2573static 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
2588static const char * const cherry_usage[] = {
2589 N_("git cherry [-v] [<upstream> [<head> [<limit>]]]"),

Callers 1

cmd_cherryFunction · 0.85

Calls 3

repo_get_oidFunction · 0.85
lookup_commit_referenceFunction · 0.85
add_pending_objectFunction · 0.85

Tested by

no test coverage detected