git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] diff-cache path restriction fix.
@ 2005-05-25  0:47 Junio C Hamano
  2005-05-25  1:00 ` Linus Torvalds
  0 siblings, 1 reply; 17+ messages in thread
From: Junio C Hamano @ 2005-05-25  0:47 UTC (permalink / raw)
  To: torvalds; +Cc: git

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--;



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2005-05-28  7:53 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-25  0:47 [PATCH] diff-cache path restriction fix Junio C Hamano
2005-05-25  1:00 ` Linus Torvalds
2005-05-25  1:05   ` Junio C Hamano
2005-05-25  1:24     ` Linus Torvalds
2005-05-25  1:49       ` Junio C Hamano
2005-05-25  2:16         ` Russ Allbery
2005-05-25  2:33           ` Junio C Hamano
2005-05-25  3:04         ` Linus Torvalds
2005-05-25  3:22           ` Junio C Hamano
2005-05-25  9:06           ` Ingo Molnar
2005-05-25 17:07             ` Linus Torvalds
2005-05-25 19:14             ` Junio C Hamano
2005-05-25 19:17               ` Thomas Glanzmann
2005-05-25 20:31             ` Matthias Urlichs
2005-05-28  7:55         ` [OT] if (4 < number_of_children) you're in trouble Junio C Hamano
2005-05-25  8:31       ` [PATCH] diff-cache path restriction fix Ingo Molnar
2005-05-25 16:02     ` Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).