summaryrefslogtreecommitdiff
path: root/transport.c
diff options
context:
space:
mode:
Diffstat (limited to 'transport.c')
-rw-r--r--transport.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/transport.c b/transport.c
index de255880a4..2250612945 100644
--- a/transport.c
+++ b/transport.c
@@ -481,6 +481,8 @@ static int set_git_option(struct git_transport_options *opts,
opts->depth = strtol(value, &end, 0);
if (*end)
die("transport: invalid depth option '%s'", value);
+ if (opts->depth < 1)
+ die("transport: invalid depth option '%s' (must be positive)", value);
}
return 0;
}