diff options
author | Abhishek Kumar <abhishekkumar8222@gmail.com> | 2021-01-16 19:11:13 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-01-19 01:21:18 +0100 |
commit | d7f92784c65b143c5ec9f435484146b6098c2f85 (patch) | |
tree | 5109cc4d32d971e1247f505f9ff8c067a3ccb6f6 /commit.h | |
parent | commit-graph: add a slab to store topological levels (diff) | |
download | git-d7f92784c65b143c5ec9f435484146b6098c2f85.tar.xz git-d7f92784c65b143c5ec9f435484146b6098c2f85.zip |
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.h')
-rw-r--r-- | commit.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -11,8 +11,8 @@ #include "commit-slab.h" #define COMMIT_NOT_FROM_GRAPH 0xFFFFFFFF -#define GENERATION_NUMBER_INFINITY 0xFFFFFFFF -#define GENERATION_NUMBER_MAX 0x3FFFFFFF +#define GENERATION_NUMBER_INFINITY ((1ULL << 63) - 1) +#define GENERATION_NUMBER_V1_MAX 0x3FFFFFFF #define GENERATION_NUMBER_ZERO 0 struct commit_list { |