git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Christian Couder <chriscool@tuxfamily.org>
Cc: Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org, Avery Pennarun <apenwarr@gmail.com>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Jonathan Nieder <jrnieder@gmail.com>
Subject: Re: [PATCH] Rename suffixcmp() to has_suffix()
Date: Mon, 4 Nov 2013 14:06:50 -0800	[thread overview]
Message-ID: <20131104220650.GA26636@sigill.intra.peff.net> (raw)
In-Reply-To: <20131104214512.19757.74215.chriscool@tuxfamily.org>

On Mon, Nov 04, 2013 at 10:45:11PM +0100, Christian Couder wrote:

> diff --git a/builtin/clone.c b/builtin/clone.c
> index 874e0fd..4b8308e 100644
> --- a/builtin/clone.c
> +++ b/builtin/clone.c
> @@ -510,7 +510,7 @@ static void write_followtags(const struct ref *refs, const char *msg)
>  	for (ref = refs; ref; ref = ref->next) {
>  		if (prefixcmp(ref->name, "refs/tags/"))
>  			continue;
> -		if (!suffixcmp(ref->name, "^{}"))
> +		if (!has_suffix(ref->name, "^{}"))

I think the intent of your patch is reasonable, but doesn't it flip the
logic of the return value? That is, shouldn't this become:

  if (has_suffix(...))

?

-Peff

      reply	other threads:[~2013-11-04 22:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-04 21:45 [PATCH] Rename suffixcmp() to has_suffix() Christian Couder
2013-11-04 22:06 ` Jeff King [this message]

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=20131104220650.GA26636@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=apenwarr@gmail.com \
    --cc=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@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).