X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=transport.c;h=72a9c292e5bcf00b226de6682656a5390e5c6ca2;hb=55dcc2ebad1b3ed4a6912f6f401f63cd3c71026f;hp=9b25ea06b1770395f650ea44618ecb1c425149bc;hpb=bc0fe84b064d2185e147b7c1f98bb6f9b7966b2c;p=git.git diff --git a/transport.c b/transport.c index 9b25ea06b..72a9c292e 100644 --- a/transport.c +++ b/transport.c @@ -474,8 +474,12 @@ static int set_git_option(struct git_transport_options *opts, } else if (!strcmp(name, TRANS_OPT_DEPTH)) { if (!value) opts->depth = 0; - else - opts->depth = atoi(value); + else { + char *end; + opts->depth = strtol(value, &end, 0); + if (*end) + die("transport: invalid depth option '%s'", value); + } return 0; } return 1;