All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Derrick Stolee <derrickstolee@github.com>
Cc: Taylor Blau <me@ttaylorr.com>, git@vger.kernel.org
Subject: Re: [PATCH] builtin/show-ref.c: avoid over-iterating with --heads, --tags
Date: Mon, 06 Jun 2022 10:07:40 -0700	[thread overview]
Message-ID: <xmqq35ghaffn.fsf@gitster.g> (raw)
In-Reply-To: <af32aefc-8184-94ff-fd80-76221dc313b4@github.com> (Derrick Stolee's message of "Fri, 3 Jun 2022 22:33:47 -0400")

Derrick Stolee <derrickstolee@github.com> writes:

>> -	for_each_ref(show_ref, NULL);
>> +	if (heads_only || tags_only) {
>> +		if (heads_only)
>> +			for_each_fullref_in("refs/heads/", show_ref, NULL);
>> +		if (tags_only)
>> +			for_each_fullref_in("refs/tags/", show_ref, NULL);
>
> This looks a little silly if these were truly "only" (they
> could not both be true), but indeed they could both be true
> and the names are just slightly misleading.
>
> Indeed, t1403-show-ref.sh tests all combinations of these
> options.

Hmph, that is right. show-heads and show-tags, perhaps.

Thanks, both.  Queued.

      reply	other threads:[~2022-06-06 17:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-03 21:55 [PATCH] builtin/show-ref.c: avoid over-iterating with --heads, --tags Taylor Blau
2022-06-04  2:33 ` Derrick Stolee
2022-06-06 17:07   ` Junio C Hamano [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=xmqq35ghaffn.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=derrickstolee@github.com \
    --cc=git@vger.kernel.org \
    --cc=me@ttaylorr.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.