Re: [PATCH 6/9] commit-graph: store the hash algorithm instead of its length

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <ps@xxxxxx>
> ---
>  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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux