Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-04-06 23:38:21 +0300
committerJunio C Hamano <gitster@pobox.com>2023-04-06 23:38:21 +0300
commit7727da99dfab82148c5b77eaf334b305fb835956 (patch)
tree99ea4038ce40c89d09592a94a715b642160216a8 /commit-graph.h
parentae73b2c8f1da39c39335ee76a0f95857712c22a7 (diff)
parentcbfe360b140fe92d9c4a763bf630c3b8ba431522 (diff)
Merge branch 'ds/ahead-behind'
"git for-each-ref" learns '%(ahead-behind:<base>)' that computes the distances from a single reference point in the history with bunch of commits in bulk. * ds/ahead-behind: commit-reach: add tips_reachable_from_bases() for-each-ref: add ahead-behind format atom commit-reach: implement ahead_behind() logic commit-graph: introduce `ensure_generations_valid()` commit-graph: return generation from memory commit-graph: simplify compute_generation_numbers() commit-graph: refactor compute_topological_levels() for-each-ref: explicitly test no matches for-each-ref: add --stdin option
Diffstat (limited to 'commit-graph.h')
-rw-r--r--commit-graph.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/commit-graph.h b/commit-graph.h
index bb88bec7aa..83aaa1dbb9 100644
--- a/commit-graph.h
+++ b/commit-graph.h
@@ -189,4 +189,12 @@ struct commit_graph_data {
*/
timestamp_t commit_graph_generation(const struct commit *);
uint32_t commit_graph_position(const struct commit *);
+
+/*
+ * After this method, all commits reachable from those in the given
+ * list will have non-zero, non-infinite generation numbers.
+ */
+void ensure_generations_valid(struct repository *r,
+ struct commit **commits, size_t nr);
+
#endif