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: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
Matthias Lederhofer committed
Apr 12, 2007 at 20:52 UTC
e4b023332c687d824cff41855b41f604ee72e0d2
1 file changed
+1
git.c
+1
@@ -66,6 +66,7 @@ static int handle_options(const char*** argv, int* argc)
66
setenv(GIT_DIR_ENVIRONMENT, (*argv)[1], 1);
67
(*argv)++;
68
(*argc)--;
69
+ handled++;
70
} else if (!prefixcmp(cmd, "--git-dir=")) {
71
setenv(GIT_DIR_ENVIRONMENT, cmd + 10, 1);
72
} else if (!strcmp(cmd, "--bare")) {