From: brian m. carlson Date: Sat, 10 Apr 2021 15:21:28 GMT Subject: [PATCH 03/15] cache: add an algo member to struct object_id Message-ID: <20210410152140.3525040-4-sandals@crustytoothpaste.net> In-Reply-To: <20210410152140.3525040-1-sandals@crustytoothpaste.net> Now that we're working with multiple hash algorithms in the same repo, it's best if we label each object ID with its algorithm so we can determine how to format a given object ID. Add a member called algo to struct object_id. Signed-off-by: brian m. carlson --- hash.h | 1 + 1 file changed, 1 insertion(+) diff --git a/hash.h b/hash.h index 3fb0c3d400..dafdcb3335 100644 --- a/hash.h +++ b/hash.h @@ -181,6 +181,7 @@ static inline int hash_algo_by_ptr(const struct git_hash_algo *p) struct object_id { unsigned char hash[GIT_MAX_RAWSZ]; + int algo; }; #define the_hash_algo the_repository->hash_algo