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

Function process_commit

walker.c:84–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82static struct prio_queue complete = { compare_commits_by_commit_date };
83
84static int process_commit(struct walker *walker, struct commit *commit)
85{
86 struct commit_list *parents;
87
88 if (repo_parse_commit(the_repository, commit))
89 return -1;
90
91 while (complete.nr) {
92 struct commit *item = prio_queue_peek(&complete);
93 if (item->date < commit->date)
94 break;
95 pop_most_recent_commit(&complete, COMPLETE);
96 }
97
98 if (commit->object.flags & COMPLETE)
99 return 0;
100
101 oidcpy(&current_commit_oid, &commit->object.oid);
102
103 walker_say(walker, "walk %s\n", oid_to_hex(&commit->object.oid));
104
105 if (process(walker, &repo_get_commit_tree(the_repository, commit)->object))
106 return -1;
107
108 for (parents = commit->parents; parents; parents = parents->next) {
109 if (process(walker, &parents->item->object))
110 return -1;
111 }
112
113 return 0;
114}
115
116static int process_tag(struct walker *walker, struct tag *tag)
117{

Callers 1

process_objectFunction · 0.70

Calls 8

repo_parse_commitFunction · 0.85
prio_queue_peekFunction · 0.85
pop_most_recent_commitFunction · 0.85
oidcpyFunction · 0.85
walker_sayFunction · 0.85
oid_to_hexFunction · 0.85
processFunction · 0.85
repo_get_commit_treeFunction · 0.85

Tested by

no test coverage detected