Skip to content

Commit e4b0233

Browse files
matledJunio C Hamano
authored andcommitted
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>
1 parent 9b11d24 commit e4b0233

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

git.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ static int handle_options(const char*** argv, int* argc)
6666
setenv(GIT_DIR_ENVIRONMENT, (*argv)[1], 1);
6767
(*argv)++;
6868
(*argc)--;
69+
handled++;
6970
} else if (!prefixcmp(cmd, "--git-dir=")) {
7071
setenv(GIT_DIR_ENVIRONMENT, cmd + 10, 1);
7172
} else if (!strcmp(cmd, "--bare")) {

0 commit comments

Comments
 (0)