From 9d4fcfe1ff5b901f47f8226d078d22370bb955be Mon Sep 17 00:00:00 2001 From: Victoria Dye Date: Tue, 14 Nov 2023 19:53:50 +0000 Subject: ref-filter.h: add max_count and omit_empty to ref_format Add an internal 'array_opts' struct to 'struct ref_format' containing formatting options that pertain to the formatting of an entire ref array: 'max_count' and 'omit_empty'. These values are specified by the '--count' and '--omit-empty' options, respectively, to 'for-each-ref'/'tag'/'branch'. Storing these values in the 'ref_format' will simplify the consolidation of ref array formatting logic across builtins in later patches. Signed-off-by: Victoria Dye Signed-off-by: Junio C Hamano --- ref-filter.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ref-filter.h') diff --git a/ref-filter.h b/ref-filter.h index 1524bc463a..d87d61238b 100644 --- a/ref-filter.h +++ b/ref-filter.h @@ -92,6 +92,11 @@ struct ref_format { /* List of bases for ahead-behind counts. */ struct string_list bases; + + struct { + int max_count; + int omit_empty; + } array_opts; }; #define REF_FILTER_INIT { \ -- cgit v1.2.3