git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: linux@horizon.com
To: raa.lkml@gmail.com
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-rev-list --help anywhere
Date: 19 Feb 2006 06:26:27 -0500	[thread overview]
Message-ID: <20060219112627.18989.qmail@science.horizon.com> (raw)

>+	for (i = 1 ; i < argc; i++)
>+	    if ( !strcmp(argv[i], "--help") )
>+		usage(rev_list_usage);

You might want to try something more like:

+	for (i = 1 ; i < argc; i++) {
+	    if ( !strcmp(argv[i], "--help") )
+		usage(rev_list_usage);
+	    if ( !strcmp(argv[i], "--") )
+		break;
+	}

So that you don't break in the perverse but legal case of
having a file named "--help".

             reply	other threads:[~2006-02-19 11:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-19 11:26 linux [this message]
2006-02-19 18:39 ` [PATCH] git-rev-list --help anywhere Alex Riesen
2006-02-19 19:25   ` Johannes Schindelin
2006-02-19 19:39     ` linux
2006-02-19 19:40     ` A Large Angry SCM
2006-02-20  5:52     ` Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2006-02-19 11:09 Alex Riesen

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

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

  git send-email \
    --in-reply-to=20060219112627.18989.qmail@science.horizon.com \
    --to=linux@horizon.com \
    --cc=git@vger.kernel.org \
    --cc=raa.lkml@gmail.com \
    /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.
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).