summaryrefslogtreecommitdiff
path: root/ref-filter.h
diff options
context:
space:
mode:
authorVictoria Dye <vdye@github.com>2023-11-14 19:53:51 (GMT)
committerJunio C Hamano <gitster@pobox.com>2023-11-16 05:02:59 (GMT)
commit6d6e5c53b0c3d5566680ee8786d40405db917917 (patch)
tree79b7ed700709bab2739b1744cb18fce221a1d2b3 /ref-filter.h
parent9d4fcfe1ff5b901f47f8226d078d22370bb955be (diff)
downloadgit-6d6e5c53b0c3d5566680ee8786d40405db917917.zip
git-6d6e5c53b0c3d5566680ee8786d40405db917917.tar.gz
git-6d6e5c53b0c3d5566680ee8786d40405db917917.tar.bz2
ref-filter.h: move contains caches into filter
Move the 'contains_cache' and 'no_contains_cache' used in filter_refs into an 'internal' struct of the 'struct ref_filter'. In later patches, the 'struct ref_filter *' will be a common data structure across multiple filtering functions. These caches are part of the common functionality the filter struct will support, so they are updated to be internally accessible wherever the filter is used. The design used here mirrors what was introduced in 576de3d956 (unpack_trees: start splitting internal fields from public API, 2023-02-27) for 'unpack_trees_options'. 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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/ref-filter.h b/ref-filter.h
index d87d612..0db3ff5 100644
--- a/ref-filter.h
+++ b/ref-filter.h
@@ -7,6 +7,7 @@
#include "commit.h"
#include "string-list.h"
#include "strvec.h"
+#include "commit-reach.h"
/* Quoting styles */
#define QUOTE_NONE 0
@@ -75,6 +76,11 @@ struct ref_filter {
lines;
int abbrev,
verbose;
+
+ struct {
+ struct contains_cache contains_cache;
+ struct contains_cache no_contains_cache;
+ } internal;
};
struct ref_format {