Thread (59 messages) 59 messages, 3 authors, 2023-10-31

Re: [PATCH v2 06/12] builtin/show-ref: stop using global variable to count matches

From: Taylor Blau <hidden>
Date: 2023-10-30 19:14:39

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.
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 <redacted>
---
 builtin/show-ref.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
Looks all good to me!

Thanks,
Taylor
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help