summaryrefslogtreecommitdiff
path: root/upload-pack.c
diff options
context:
space:
mode:
authorAbhishek Kumar <abhishekkumar8222@gmail.com>2021-01-16 18:11:13 +0000
committerJunio C Hamano <gitster@pobox.com>2021-01-18 16:21:18 -0800
commitd7f92784c65b143c5ec9f435484146b6098c2f85 (patch)
tree5109cc4d32d971e1247f505f9ff8c067a3ccb6f6 /upload-pack.c
parent72a2bfcaf01860ce8dd6921490d903dc0ad59c89 (diff)
downloadgit-d7f92784c65b143c5ec9f435484146b6098c2f85.tar.gz
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 'upload-pack.c')
-rw-r--r--upload-pack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/upload-pack.c b/upload-pack.c
index 3b66bf92ba..b87607e0dd 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -500,7 +500,7 @@ static int got_oid(struct upload_pack_data *data,
static int ok_to_give_up(struct upload_pack_data *data)
{
- uint32_t min_generation = GENERATION_NUMBER_ZERO;
+ timestamp_t min_generation = GENERATION_NUMBER_ZERO;
if (!data->have_obj.nr)
return 0;