aboutsummaryrefslogtreecommitdiff
path: root/transport.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-01-12 15:11:43 -0800
committerJunio C Hamano <gitster@pobox.com>2022-01-12 15:11:43 -0800
commit12f82b0dd70aaefdb9363a96403d41d13b97e5b0 (patch)
treed2de6d99648f1901c8b72c1fbbe7744aeade71f4 /transport.h
parent453cef74556652c5ecdc840744fa352005bb3152 (diff)
parent58d4d7f1c5a665111f05c61901a11a555703fe11 (diff)
downloadgit-12f82b0dd70aaefdb9363a96403d41d13b97e5b0.tar.xz
Merge branch 'ps/lockfile-cleanup-fix'
Some lockfile code called free() in signal-death code path, which has been corrected. * ps/lockfile-cleanup-fix: fetch: fix deadlock when cleaning up lockfiles in async signals
Diffstat (limited to 'transport.h')
-rw-r--r--transport.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/transport.h b/transport.h
index 8bb4c8bbc8..3f16e50c19 100644
--- a/transport.h
+++ b/transport.h
@@ -279,7 +279,19 @@ const struct ref *transport_get_remote_refs(struct transport *transport,
*/
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);
+
+/*
+ * If this flag is set, unlocking will avoid to call non-async-signal-safe
+ * functions. This will necessarily leave behind some data structures which
+ * cannot be cleaned up.
+ */
+#define TRANSPORT_UNLOCK_PACK_IN_SIGNAL_HANDLER (1 << 0)
+
+/*
+ * Unlock all packfiles locked by the transport.
+ */
+void transport_unlock_pack(struct transport *transport, unsigned int flags);
+
int transport_disconnect(struct transport *transport);
char *transport_anonymize_url(const char *url);
void transport_take_over(struct transport *transport,