summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorMatthias Lederhofer <matled@gmx.net>2007-04-12 18:52:03 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-04-13 00:46:51 (GMT)
commite4b023332c687d824cff41855b41f604ee72e0d2 (patch)
treea07437cf1915795c9381e651608bffe35bed5894 /git.c
parent9b11d24d4156e0b2246383faad16eb8aa0caeefb (diff)
downloadgit-e4b023332c687d824cff41855b41f604ee72e0d2.zip
git-e4b023332c687d824cff41855b41f604ee72e0d2.tar.gz
git-e4b023332c687d824cff41855b41f604ee72e0d2.tar.bz2
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>
Diffstat (limited to 'git.c')
-rw-r--r--git.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/git.c b/git.c
index 33dd4d3..7def319 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")) {