From: Junio C Hamano <gitster@pobox.com>
To: Jake Goulding <goulding@vivisimo.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 3/3] Add --contains flag to git tag
Date: Thu, 22 Jan 2009 17:18:37 -0800 [thread overview]
Message-ID: <7v1vuu6cr6.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <497913EE.9040608@vivisimo.com> (Jake Goulding's message of "Thu, 22 Jan 2009 19:48:46 -0500")
Jake Goulding <goulding@vivisimo.com> writes:
> @@ -34,7 +35,6 @@ static int show_reference(const char *refname, const
> unsigned char *sha1,
> int flag, void *cb_data)
> {
> struct tag_filter *filter = cb_data;
> -
> if (!fnmatch(filter->pattern, refname, 0)) {
> int i;
> unsigned long size;
Here you can see a long line wrapped.
What does this hunk have to do with adding --contains option anyway?
> @@ -42,6 +42,18 @@ static int show_reference(const char *refname, const
> unsigned char *sha1,
> char *buf, *sp, *eol;
> size_t len;
>
> + if (filter->with_commit) {
> + struct commit *commit;
> +
> + commit = lookup_commit_reference_gently(sha1, 1);
> + if (!commit) {
> + error("tag '%s' does not point at a commit", refname);
> + return 0;
Drop this error() call, and just return silently. A tag that does not
point at a commit is not an error at all.
next prev parent reply other threads:[~2009-01-23 1:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1232671630-19683-1-git-send-email-goulding@vivisimo.com>
2009-01-23 0:48 ` [PATCH 2/3] Make has_commit non-static Jake Goulding
2009-01-23 1:13 ` Junio C Hamano
2009-01-23 22:41 ` Jake Goulding
[not found] ` <1232671630-19683-2-git-send-email-goulding@vivisimo.com>
2009-01-23 0:48 ` [PATCH 3/3] Add --contains flag to git tag Jake Goulding
2009-01-23 1:18 ` Junio C Hamano [this message]
2009-01-26 14:13 [PATCH 1/3] Make opt_parse_with_commit non-static Jake Goulding
2009-01-26 14:13 ` [PATCH 2/3] Make has_commit non-static Jake Goulding
2009-01-26 14:13 ` [PATCH 3/3] Add --contains flag to git tag Jake Goulding
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=7v1vuu6cr6.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=goulding@vivisimo.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).