diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-01-04 11:21:42 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-01-04 11:21:42 -0800 |
commit | 247f9d23da8cfd255533433ad2aa07d172afac0b (patch) | |
tree | b004483b600ed0a4b0e69396544bbe28081ee1ba /transport.c | |
parent | 4570aeb0d85f3b5ff274b6d5a651c2ee06d25d76 (diff) | |
parent | 1327d83954bcf755094995b63317b23986c550f2 (diff) | |
download | git-247f9d23da8cfd255533433ad2aa07d172afac0b.tar.gz |
Merge branch 'maint'
* maint:
t5550: repack everything into one file
Catch invalid --depth option passed to clone or fetch
Diffstat (limited to 'transport.c')
-rw-r--r-- | transport.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/transport.c b/transport.c index a99b7c9c45..cac0c065ff 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; |