提交 e4b02333 编写于 作者: M Matthias Lederhofer 提交者: Junio C Hamano

handle_options in git wrapper miscounts the options it handled.

handle_options did not count the number of used arguments
correctly.  When --git-dir was used the extra argument was
not added to the number of handled arguments.
Signed-off-by: NMatthias Lederhofer <matled@gmx.net>
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 9b11d24d
......@@ -66,6 +66,7 @@ static int handle_options(const char*** argv, int* argc)
setenv(GIT_DIR_ENVIRONMENT, (*argv)[1], 1);
(*argv)++;
(*argc)--;
handled++;
} else if (!prefixcmp(cmd, "--git-dir=")) {
setenv(GIT_DIR_ENVIRONMENT, cmd + 10, 1);
} else if (!strcmp(cmd, "--bare")) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册