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 <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patrick Steinhardt
2025-08-15 07:49:48 +02:00
committed by Junio C Hamano
parent 3481cb7dfd
commit e45402bb19
2 changed files with 19 additions and 19 deletions

View File

@@ -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;