From: Junio C Hamano Date: Thu, 16 Nov 2023 05:39:07 GMT Subject: Re: [PATCH v2 04/10] ref-filter.h: add functions for filter/format & format-only Message-ID: In-Reply-To: <187b1d6610f96ba16bb7e1ff80d1c994a67b8753.1699991638.git.gitgitgadget@gmail.com> "Victoria Dye via GitGitGadget" writes: > 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 > --- > 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.