Re: [PATCH v2 04/10] ref-filter.h: add functions for filter/format & format-only
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 16, 2023, 05:39 UTC
- Message-ID
- <xmqq8r6ys1dw.fsf@gitster.g>
- In-Reply-To
- <187b1d6610f96ba16bb7e1ff80d1c994a67b8753.1699991638.git.gitgitgadget@gmail.com>
"Victoria Dye via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 13 quoted lines
> This consolidates much of the code used to filter and format refs in > 'builtin/for-each-ref.c', 'builtin/tag.c', and 'builtin/branch.c', reducing > duplication and simplifying the future changes needed to optimize the filter > & format process. > > Signed-off-by: Victoria Dye <vdye@github.com> > --- > builtin/branch.c | 33 +++++++++++++++++---------------- > builtin/for-each-ref.c | 27 +-------------------------- > builtin/tag.c | 23 +---------------------- > ref-filter.c | 35 +++++++++++++++++++++++++++++++++++ > ref-filter.h | 14 ++++++++++++++ > 5 files changed, 68 insertions(+), 64 deletions(-)
The amount of existing duplication of code is rather surprising, and this patch nicely refactors to improve. Good.
Thanks.