From: Matthias Lederhofer Date: Thu, 12 Apr 2007 18:52:03 +0000 (+0200) Subject: handle_options in git wrapper miscounts the options it handled. X-Git-Tag: v1.5.1.2~41 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e4b023332c687d824cff41855b41f604ee72e0d2;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/git.c b/git.c index 33dd4d39d..7def319e6 100644 --- a/git.c +++ b/git.c @@ -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")) {