summaryrefslogtreecommitdiff
path: root/transport.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-08-03 15:10:24 -0700
committerJunio C Hamano <gitster@pobox.com>2016-08-03 15:10:24 -0700
commitcf27c7996e986395a05c0056684923195295fd14 (patch)
tree91c7d576445ca71e9eba9d11bfaddd353a326ab5 /transport.h
parent4067a45438282fe967779fcbc5c3513d2cbb5913 (diff)
parent3ac870300a7bb430341388a8f2ec465328986617 (diff)
downloadgit-cf27c7996e986395a05c0056684923195295fd14.tar.gz
Merge branch 'sb/push-options'
"git push" learned to accept and pass extra options to the receiving end so that hooks can read and react to them. * sb/push-options: add a test for push options push: accept push options receive-pack: implement advertising and receiving push options push options: {pre,post}-receive hook learns about push options
Diffstat (limited to 'transport.h')
-rw-r--r--transport.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/transport.h b/transport.h
index c68140892c..6fe3485325 100644
--- a/transport.h
+++ b/transport.h
@@ -48,6 +48,12 @@ struct transport {
*/
unsigned cloning : 1;
+ /*
+ * These strings will be passed to the {pre, post}-receive hook,
+ * on the remote side, if both sides support the push options capability.
+ */
+ const struct string_list *push_options;
+
/**
* Returns 0 if successful, positive if the option is not
* recognized or is inapplicable, and negative if the option
@@ -134,6 +140,7 @@ struct transport {
#define TRANSPORT_PUSH_CERT_ALWAYS 2048
#define TRANSPORT_PUSH_CERT_IF_ASKED 4096
#define TRANSPORT_PUSH_ATOMIC 8192
+#define TRANSPORT_PUSH_OPTIONS 16384
#define TRANSPORT_SUMMARY_WIDTH (2 * DEFAULT_ABBREV + 3)
#define TRANSPORT_SUMMARY(x) (int)(TRANSPORT_SUMMARY_WIDTH + strlen(x) - gettext_width(x)), (x)