From: Junio C Hamano Date: Mon, 06 Jun 2022 17:07:40 GMT Subject: Re: [PATCH] builtin/show-ref.c: avoid over-iterating with --heads, --tags Message-ID: In-Reply-To: Derrick Stolee 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.