提交 6ea93854 编写于 作者: J Junio C Hamano

Merge branch 'nd/maint-parse-depth' into maint

* nd/maint-parse-depth:
  Catch invalid --depth option passed to clone or fetch
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册