MCPcopy Index your code
hub / github.com/git/git / pop_most_recent_commit

Function pop_most_recent_commit

commit.c:782–804  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

780}
781
782struct commit *pop_most_recent_commit(struct prio_queue *queue,
783 unsigned int mark)
784{
785 struct commit *ret = prio_queue_peek(queue);
786 int get_pending = 1;
787 struct commit_list *parents = ret->parents;
788
789 while (parents) {
790 struct commit *commit = parents->item;
791 if (!repo_parse_commit(the_repository, commit) && !(commit->object.flags & mark)) {
792 commit->object.flags |= mark;
793 if (get_pending)
794 prio_queue_replace(queue, commit);
795 else
796 prio_queue_put(queue, commit);
797 get_pending = 0;
798 }
799 parents = parents->next;
800 }
801 if (get_pending)
802 prio_queue_get(queue);
803 return ret;
804}
805
806static void clear_commit_marks_1(struct commit_list **plist,
807 struct commit *commit, unsigned int mark)

Callers 3

get_oid_onelineFunction · 0.85
process_commitFunction · 0.85

Calls 5

prio_queue_peekFunction · 0.85
repo_parse_commitFunction · 0.85
prio_queue_replaceFunction · 0.85
prio_queue_putFunction · 0.85
prio_queue_getFunction · 0.85

Tested by

no test coverage detected