summaryrefslogtreecommitdiffstats
path: root/bundle.h
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2020-06-19 19:56:00 +0200
committerJunio C Hamano <gitster@pobox.com>2020-06-19 23:04:09 +0200
commit6161ce7bbeeb128dd1a176d8355e2ce18168b16a (patch)
treef501691afda185e462ed8be61f945707734f9715 /bundle.h
parentt5300: pass --object-format to git index-pack (diff)
downloadgit-6161ce7bbeeb128dd1a176d8355e2ce18168b16a.tar.xz
git-6161ce7bbeeb128dd1a176d8355e2ce18168b16a.zip
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 <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'bundle.h')
-rw-r--r--bundle.h1
1 files changed, 1 insertions, 0 deletions
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);