Re: [PATCH v2 06/12] builtin/show-ref: stop using global variable to count matches
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Oct 30, 2023, 19:14 UTC
- Message-ID
- <ZUAAmY4aKGrvSDp8@nand.local>
- In-Reply-To
- <d52a5e8ced2adc5c9315edea9fc497d1ffa30125.1698314128.git.ps@pks.im>
On Thu, Oct 26, 2023 at 11:56:42AM +0200, Patrick Steinhardt wrote:
> When passing patterns to git-show-ref(1) we're checking whether any > reference matches -- if none does, we indicate this condition via an > unsuccessful exit code.
s/does/do, but not a big enough deal to reroll IMHO.
Show 9 quoted lines
> We're using a global variable to count these matches, which is required > because the counter is getting incremented in a callback function. But > now that we have the `struct show_ref_data` in place, we can get rid of > the global variable and put the counter in there instead. > > Signed-off-by: Patrick Steinhardt <ps@pks.im> > --- > builtin/show-ref.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-)
Looks all good to me!
Thanks, Taylor