Re: [PATCH 6/9] commit-graph: store the hash algorithm instead of its length
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Aug 4, 2025, 22:07 UTC
- Message-ID
- <aJEvEB0DXcnmwme8@nand.local>
- 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:
Show 12 quoted lines
> 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> > --- > 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