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

Function read_one_commit

builtin/commit-graph.c:168–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166}
167
168static int read_one_commit(struct oidset *commits, struct progress *progress,
169 const char *hash)
170{
171 struct object *result;
172 struct object_id oid;
173 const char *end;
174
175 if (parse_oid_hex(hash, &oid, &end))
176 return error(_("unexpected non-hex object ID: %s"), hash);
177
178 result = deref_tag(the_repository, parse_object(the_repository, &oid),
179 NULL, 0);
180 if (!result)
181 return error(_("invalid object: %s"), hash);
182 else if (object_as_type(result, OBJ_COMMIT, 1))
183 oidset_insert(commits, &result->oid);
184
185 display_progress(progress, oidset_size(commits));
186
187 return 0;
188}
189
190static int write_option_max_new_filters(const struct option *opt,
191 const char *arg,

Callers 1

graph_writeFunction · 0.85

Calls 8

parse_oid_hexFunction · 0.85
errorFunction · 0.85
deref_tagFunction · 0.85
parse_objectFunction · 0.85
object_as_typeFunction · 0.85
oidset_insertFunction · 0.85
display_progressFunction · 0.85
oidset_sizeFunction · 0.85

Tested by

no test coverage detected