protocol: introduce enum protocol_version value protocol_v2
[gitweb.git] / builtin / upload-pack.c
index 2cb5cb35b06d9946ea7c5b3043249736b260737d..8d53e9794b17451f9dd0ad13eab6b294736cde69 100644 (file)
@@ -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,