X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=transport.c;h=cac0c065ff9f82011b204f932932283b01a5d034;hb=69204d0ab18d28d07ee2c8c9b50bbf5bd80343ab;hp=a99b7c9c457c4ac3b76dc6859507711f847e5f62;hpb=1aea303d7eafc5f178b253f4d069eb5f2acfb409;p=git.git diff --git a/transport.c b/transport.c index a99b7c9c4..cac0c065f 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;