From: Taylor Blau Date: Mon, 04 Aug 2025 22:07:12 GMT Subject: Re: [PATCH 6/9] commit-graph: store the hash algorithm instead of its length Message-ID: In-Reply-To: <20250804-b4-pks-commit-graph-wo-the-repository-v1-6-850d626eb2e8@pks.im> On Mon, Aug 04, 2025 at 10:17:22AM +0200, Patrick Steinhardt wrote: > 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 > --- > commit-graph.c | 36 ++++++++++++++++++------------------ > commit-graph.h | 2 +- > 2 files changed, 19 insertions(+), 19 deletions(-) Also makes sense. I briefly wondered about hash version mismatches, but parse_commit_graph() already covers us here by comparing the hash_version field written in the commit-graph's header against oid_version(the_hash_algo). Thanks, Taylor