diff options
| author | Patrick Steinhardt <ps@pks.im> | 2025-09-04 14:49:58 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-09-04 16:16:22 -0700 |
| commit | 88bc3500e5be888c13757d12c4a5cb16e39ec673 (patch) | |
| tree | 90fb8694bf1b3f2cf01d100ea8a129870be12b07 /object-name.c | |
| parent | 199d452758605a3ff15ac7d900653b4de7455e24 (diff) | |
commit-graph: return commit graph from `repo_find_commit_pos_in_graph()`
The function `repo_find_commit_pos_in_graph()` takes a commit as input
and tries to figure out whether the given repository has a commit graph
that contains that specific commit. If so, it returns the corresponding
position of that commit inside the graph.
Right now though we only return the position, but not the actual graph
that the commit has been found in. This is sensible as repositories
always have the graph in `struct repository::objects::commit_graph`.
Consequently, the caller always knows where to find it.
But in a subsequent change we're going to move the graph into the object
sources. This would require callers of the function to loop through all
sources to find the relevant commit graph.
Refactor the code so that we instead return the commit-graph that the
commit has been found with.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'object-name.c')
0 files changed, 0 insertions, 0 deletions
