From e45402bb199e869c223f575bf2f44db679d00279 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Fri, 15 Aug 2025 07:49:48 +0200 Subject: commit-graph: store the hash algorithm instead of its length The commit-graph stores the length of the hash algorithm it uses. In subsequent commits we'll need to pass the whole hash algorithm around though, which we currently don't have access to. Refactor the code so that we store the hash algorithm instead of only its size. Signed-off-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- commit-graph.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'commit-graph.h') diff --git a/commit-graph.h b/commit-graph.h index 78ab7b875b..7dc1f2b22b 100644 --- a/commit-graph.h +++ b/commit-graph.h @@ -84,7 +84,7 @@ struct commit_graph { const unsigned char *data; size_t data_len; - unsigned char hash_len; + const struct git_hash_algo *hash_algo; unsigned char num_chunks; uint32_t num_commits; struct object_id oid; -- cgit v1.2.3