From 6161ce7bbeeb128dd1a176d8355e2ce18168b16a Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Fri, 19 Jun 2020 17:56:00 +0000 Subject: bundle: detect hash algorithm when reading refs Much like with the dumb HTTP transport, there isn't a way to explicitly specify the hash algorithm when dealing with a bundle, so detect the algorithm based on the length of the object IDs in the prerequisites and ref advertisements. Signed-off-by: brian m. carlson Signed-off-by: Junio C Hamano --- bundle.h | 1 + 1 file changed, 1 insertion(+) (limited to 'bundle.h') diff --git a/bundle.h b/bundle.h index ceab0c7475..2dc9442024 100644 --- a/bundle.h +++ b/bundle.h @@ -15,6 +15,7 @@ struct ref_list { struct bundle_header { struct ref_list prerequisites; struct ref_list references; + const struct git_hash_algo *hash_algo; }; int is_bundle(const char *path, int quiet); -- cgit v1.2.3