summaryrefslogtreecommitdiff
path: root/ref-filter.h
diff options
context:
space:
mode:
authorVictoria Dye <vdye@github.com>2023-11-14 19:53:50 +0000
committerJunio C Hamano <gitster@pobox.com>2023-11-16 14:02:59 +0900
commit9d4fcfe1ff5b901f47f8226d078d22370bb955be (patch)
tree80cf79b021c0e117f95659c647973f01d399d22f /ref-filter.h
parent56d26ade97135614ccc60cb215d6c9cb22babfb1 (diff)
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 <vdye@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'ref-filter.h')
-rw-r--r--ref-filter.h5
1 files changed, 5 insertions, 0 deletions
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 { \