Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-01-04 23:21:42 +0400
committerJunio C Hamano <gitster@pobox.com>2012-01-04 23:21:42 +0400
commit247f9d23da8cfd255533433ad2aa07d172afac0b (patch)
treeb004483b600ed0a4b0e69396544bbe28081ee1ba /transport.c
parent4570aeb0d85f3b5ff274b6d5a651c2ee06d25d76 (diff)
parent1327d83954bcf755094995b63317b23986c550f2 (diff)
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.c8
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;