aboutsummaryrefslogtreecommitdiffstats
path: root/commit-graph.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-10-13 22:00:35 -0700
committerJunio C Hamano <gitster@pobox.com>2025-10-13 22:00:35 -0700
commit47c3e03034dbde74874406d1155e46f86d6bd859 (patch)
treee00e8de639c3e19c02b9fd2b4e8a3bacccf2ca2a /commit-graph.h
parentMerge branch 'ja/doc-markup-attached-paragraph-fix' (diff)
parentcommit-graph: pass graphs that are to be merged as parameter (diff)
downloadgit-47c3e03034dbde74874406d1155e46f86d6bd859.tar.gz
git-47c3e03034dbde74874406d1155e46f86d6bd859.zip
Merge branch 'ps/commit-graph-per-object-source'
Code clean-up around commit-graph. * ps/commit-graph-per-object-source: commit-graph: pass graphs that are to be merged as parameter commit-graph: return commit graph from `repo_find_commit_pos_in_graph()` commit-graph: return the prepared commit graph from `prepare_commit_graph()` revision: drop explicit check for commit graph blame: drop explicit check for commit graph
Diffstat (limited to 'commit-graph.h')
-rw-r--r--commit-graph.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/commit-graph.h b/commit-graph.h
index 4899b54ef8..f6a5433641 100644
--- a/commit-graph.h
+++ b/commit-graph.h
@@ -48,10 +48,9 @@ int open_commit_graph_chain(const char *chain_file, int *fd, struct stat *st,
int parse_commit_in_graph(struct repository *r, struct commit *item);
/*
- * Fills `*pos` with the graph position of `c`, and returns 1 if `c` is
- * found in the commit-graph belonging to `r`, or 0 otherwise.
- * Initializes the commit-graph belonging to `r` if it hasn't been
- * already.
+ * Fills `*pos` with the graph position of `c`, and returns the graph `c` is
+ * found in, or NULL otherwise. Initializes the commit-graphs belonging to
+ * `r` if it hasn't been already.
*
* Note: this is a low-level helper that does not alter any slab data
* associated with `c`. Useful in circumstances where the slab data is
@@ -59,8 +58,9 @@ int parse_commit_in_graph(struct repository *r, struct commit *item);
*
* In most cases, callers should use `parse_commit_in_graph()` instead.
*/
-int repo_find_commit_pos_in_graph(struct repository *r, struct commit *c,
- uint32_t *pos);
+struct commit_graph *repo_find_commit_pos_in_graph(struct repository *r,
+ struct commit *c,
+ uint32_t *pos);
/*
* Look up the given commit ID in the commit-graph. This will only return a