]> git.ipfire.org Git - thirdparty/git.git/blobdiff - transport.h
Merge branch 'bc/sha-256-part-2'
[thirdparty/git.git] / transport.h
index 05efa72db194e7526f8a5887b8ffeb19c86c91d5..b3c30133ea4073603086ac4c2b75bb223b5897b2 100644 (file)
@@ -115,6 +115,8 @@ struct transport {
        struct git_transport_options *smart_options;
 
        enum transport_family family;
+
+       const struct git_hash_algo *hash_algo;
 };
 
 #define TRANSPORT_PUSH_ALL                     (1<<0)
@@ -243,6 +245,12 @@ int transport_push(struct repository *repo,
 const struct ref *transport_get_remote_refs(struct transport *transport,
                                            const struct argv_array *ref_prefixes);
 
+/*
+ * Fetch the hash algorithm used by a remote.
+ *
+ * This can only be called after fetching the remote refs.
+ */
+const struct git_hash_algo *transport_get_hash_algo(struct transport *transport);
 int transport_fetch_refs(struct transport *transport, struct ref *refs);
 void transport_unlock_pack(struct transport *transport);
 int transport_disconnect(struct transport *transport);