提交 4a62eaed 编写于 作者: J Junio C Hamano

init-db: check extra arguments and complain.

"git-init-db junk" does not complain but just ignores "junk".
Die with the usage string in such a case.
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 9c2e7c0c
......@@ -237,9 +237,7 @@ int main(int argc, char **argv)
for (i = 1; i < argc; i++, argv++) {
char *arg = argv[1];
if (arg[0] != '-')
break;
else if (!strncmp(arg, "--template=", 11))
if (!strncmp(arg, "--template=", 11))
template_dir = arg+11;
else
die(init_db_usage);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册