git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: torvalds@osdl.net
Cc: git@vger.kernel.org
Subject: [PATCH] diff-cache path restriction fix.
Date: Tue, 24 May 2005 17:47:08 -0700	[thread overview]
Message-ID: <7vu0ksrv1v.fsf@assigned-by-dhcp.cox.net> (raw)

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



             reply	other threads:[~2005-05-25  0:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-25  0:47 Junio C Hamano [this message]
2005-05-25  1:00 ` [PATCH] diff-cache path restriction fix 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vu0ksrv1v.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=torvalds@osdl.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).