summaryrefslogtreecommitdiff
path: root/builtin/upload-pack.c
diff options
context:
space:
mode:
authorLibravatar Brandon Williams <bmwill@google.com>2018-03-14 11:31:47 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-03-14 14:15:07 -0700
commit8f6982b4e16c60bba713a3b6592b2ff5c7476974 (patch)
tree2cc541fc7eac51ebf0a8aee415851f56d8eae64e /builtin/upload-pack.c
parenttransport: store protocol version (diff)
downloadtgif-8f6982b4e16c60bba713a3b6592b2ff5c7476974.tar.xz
protocol: introduce enum protocol_version value protocol_v2
Introduce protocol_v2, a new value for 'enum protocol_version'. Subsequent patches will fill in the implementation of protocol_v2. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/upload-pack.c')
-rw-r--r--builtin/upload-pack.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/builtin/upload-pack.c b/builtin/upload-pack.c
index 2cb5cb35b0..8d53e9794b 100644
--- a/builtin/upload-pack.c
+++ b/builtin/upload-pack.c
@@ -47,6 +47,13 @@ int cmd_upload_pack(int argc, const char **argv, const char *prefix)
die("'%s' does not appear to be a git repository", dir);
switch (determine_protocol_version_server()) {
+ case protocol_v2:
+ /*
+ * fetch support for protocol v2 has not been implemented yet,
+ * so ignore the request to use v2 and fallback to using v0.
+ */
+ upload_pack(&opts);
+ break;
case protocol_v1:
/*
* v1 is just the original protocol with a version string,