From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Kevin Ballard <kevin@sb.org>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] git-fetch: Don't trigger a bus error when given the refspec "tag"
Date: Sat, 5 Apr 2008 19:33:22 +0100 (BST) [thread overview]
Message-ID: <alpine.DEB.1.00.0804051931480.12583@eeepc-johanness> (raw)
In-Reply-To: <1207420133-23631-1-git-send-email-kevin@sb.org>
Hi,
On Sat, 5 Apr 2008, Kevin Ballard wrote:
> diff --git a/builtin-fetch.c b/builtin-fetch.c
> index a11548c..5841b3e 100644
> --- a/builtin-fetch.c
> +++ b/builtin-fetch.c
> @@ -637,6 +637,8 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
> if (!strcmp(argv[i], "tag")) {
> char *ref;
> i++;
> + if (i >= argc)
> + die("You need to specify a tag name.");
Would it not be better to check in the if() above? IOW
if (i + 1 < argc && !strcmp(argv[i], "tag")) {
Hmm?
Ciao,
Dscho
next prev parent reply other threads:[~2008-04-05 18:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-05 18:28 [PATCH] git-fetch: Don't trigger a bus error when given the refspec "tag" Kevin Ballard
2008-04-05 18:33 ` Johannes Schindelin [this message]
2008-04-05 18:46 ` Kevin Ballard
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=alpine.DEB.1.00.0804051931480.12583@eeepc-johanness \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=kevin@sb.org \
/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