summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 15b7898)
raw | patch | inline | side by side (parent: 15b7898)
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | |
Wed, 4 Jan 2012 10:01:55 +0000 (17:01 +0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 4 Jan 2012 17:39:36 +0000 (09:39 -0800) |
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
transport.c | patch | blob | history |
diff --git a/transport.c b/transport.c
index c9c8056f9de69bd378cd271d70363b5560f13e07..7bfbf31f6b9a84d5e77a8d2cc59103b2dc0c3105 100644 (file)
--- a/transport.c
+++ b/transport.c
} 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;