summaryrefslogtreecommitdiff
path: root/commit-graph.h
diff options
context:
space:
mode:
authorAbhishek Kumar <abhishekkumar8222@gmail.com>2021-01-16 18:11:13 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-01-19 00:21:18 (GMT)
commitd7f92784c65b143c5ec9f435484146b6098c2f85 (patch)
tree5109cc4d32d971e1247f505f9ff8c067a3ccb6f6 /commit-graph.h
parent72a2bfcaf01860ce8dd6921490d903dc0ad59c89 (diff)
downloadgit-d7f92784c65b143c5ec9f435484146b6098c2f85.zip
git-d7f92784c65b143c5ec9f435484146b6098c2f85.tar.gz
git-d7f92784c65b143c5ec9f435484146b6098c2f85.tar.bz2
commit-graph: return 64-bit generation number
In a preparatory step for introducing corrected commit dates, let's return timestamp_t values from commit_graph_generation(), use timestamp_t for local variables and define GENERATION_NUMBER_INFINITY as (2 ^ 63 - 1) instead. We rename GENERATION_NUMBER_MAX to GENERATION_NUMBER_V1_MAX to represent the largest topological level we can store in the commit data chunk. With corrected commit dates implemented, we will have two such *_MAX variables to denote the largest offset and largest topological level that can be stored. Signed-off-by: Abhishek Kumar <abhishekkumar8222@gmail.com> Reviewed-by: Taylor Blau <me@ttaylorr.com> Reviewed-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.h')
-rw-r--r--commit-graph.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/commit-graph.h b/commit-graph.h
index 00f0074..2e9aa78 100644
--- a/commit-graph.h
+++ b/commit-graph.h
@@ -145,12 +145,12 @@ void disable_commit_graph(struct repository *r);
struct commit_graph_data {
uint32_t graph_pos;
- uint32_t generation;
+ timestamp_t generation;
};
/*
* Commits should be parsed before accessing generation, graph positions.
*/
-uint32_t commit_graph_generation(const struct commit *);
+timestamp_t commit_graph_generation(const struct commit *);
uint32_t commit_graph_position(const struct commit *);
#endif