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

Function keep_entry

reflog.c:273–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

271}
272
273static int keep_entry(struct commit **it, struct object_id *oid)
274{
275 struct commit *commit;
276
277 if (is_null_oid(oid))
278 return 1;
279 commit = lookup_commit_reference_gently(the_repository, oid, 1);
280 if (!commit)
281 return 0;
282
283 /*
284 * Make sure everything in this commit exists.
285 *
286 * We have walked all the objects reachable from the refs
287 * and cache earlier. The commits reachable by this commit
288 * must meet SEEN commits -- and then we should mark them as
289 * SEEN as well.
290 */
291 if (!commit_is_complete(commit))
292 return 0;
293 *it = commit;
294 return 1;
295}
296
297/*
298 * Starting from commits in the cb->mark_list, mark commits that are

Callers 1

should_expire_reflog_entFunction · 0.70

Calls 3

is_null_oidFunction · 0.85
commit_is_completeFunction · 0.85

Tested by

no test coverage detected