path: root/builtin/upload-pack.c
diff options
authorBrandon Williams <>2018-03-14 18:31:47 (GMT)
committerJunio C Hamano <>2018-03-14 21:15:07 (GMT)
commit8f6982b4e16c60bba713a3b6592b2ff5c7476974 (patch)
tree2cc541fc7eac51ebf0a8aee415851f56d8eae64e /builtin/upload-pack.c
parent432e95651031025e421ae2f521f7c0d9f60c527c (diff)
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 <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'builtin/upload-pack.c')
1 files changed, 7 insertions, 0 deletions
diff --git a/builtin/upload-pack.c b/builtin/upload-pack.c
index 2cb5cb3..8d53e97 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,