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

Function add_ref_to_set

commit-graph.c:1887–1901  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1885};
1886
1887static int add_ref_to_set(const struct reference *ref, void *cb_data)
1888{
1889 const struct object_id *maybe_peeled = ref->oid;
1890 struct object_id peeled;
1891 struct refs_cb_data *data = (struct refs_cb_data *)cb_data;
1892
1893 if (!reference_get_peeled_oid(data->repo, ref, &peeled))
1894 maybe_peeled = &peeled;
1895 if (odb_read_object_info(data->repo->objects, maybe_peeled, NULL) == OBJ_COMMIT)
1896 oidset_insert(data->commits, maybe_peeled);
1897
1898 display_progress(data->progress, oidset_size(data->commits));
1899
1900 return 0;
1901}
1902
1903int write_commit_graph_reachable(struct odb_source *source,
1904 enum commit_graph_write_flags flags,

Callers

nothing calls this directly

Calls 5

reference_get_peeled_oidFunction · 0.85
odb_read_object_infoFunction · 0.85
oidset_insertFunction · 0.85
display_progressFunction · 0.85
oidset_sizeFunction · 0.85

Tested by

no test coverage detected