[PATCH] diff-cache path restriction fix.
- From
Junio C Hamano <junkio@cox.net>
- Date
- May 25, 2005, 00:47 UTC
- Message-ID
- <7vu0ksrv1v.fsf@assigned-by-dhcp.cox.net>
It advertises the path restriction in documentation and usage string, but the argument parsing code was not updated and was causing it to refuse to run. One liner fix is here.
Signed-off-by: Junio C Hamano <junkio@cox.net> --- # - linus: git-update-cache: allow dot-files # + (working tree)
diff --git a/diff-cache.c b/diff-cache.c --- a/diff-cache.c +++ b/diff-cache.c @@ -164,7 +164,7 @@ int main(int argc, const char **argv) int ret; read_cache(); - while (argc > 2) { + while (1 < argc && argv[1][0] == '-') { const char *arg = argv[1]; argv++; argc--;