summaryrefslogtreecommitdiff
path: root/builtin/receive-pack.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/receive-pack.c')
-rw-r--r--builtin/receive-pack.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 2bd7365..f1f0f7b 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -1192,7 +1192,12 @@ static int run_proc_receive_hook(struct command *commands,
goto cleanup;
}
- if (version != 1) {
+ switch (version) {
+ case 0:
+ /* fallthrough */
+ case 1:
+ break;
+ default:
strbuf_addf(&errmsg, "proc-receive version '%d' is not supported",
version);
code = -1;