summaryrefslogtreecommitdiffstats
path: root/refs.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-09-25 19:37:11 +0200
committerJunio C Hamano <gitster@pobox.com>2024-09-25 19:37:11 +0200
commit52f57e94bd1cc32eef1b02b941250720017f0b34 (patch)
tree4eaa98c07974cea893774a65d5c7ee4fe7217525 /refs.h
parentMerge branch 'ps/apply-leakfix' (diff)
parentrefs/reftable: wire up support for exclude patterns (diff)
downloadgit-52f57e94bd1cc32eef1b02b941250720017f0b34.tar.xz
git-52f57e94bd1cc32eef1b02b941250720017f0b34.zip
Merge branch 'ps/reftable-exclude'
The reftable backend learned to more efficiently handle exclude patterns while enumerating the refs. * ps/reftable-exclude: refs/reftable: wire up support for exclude patterns reftable/reader: make table iterator reseekable t/unit-tests: introduce reftable library Makefile: stop listing test library objects twice builtin/receive-pack: fix exclude patterns when announcing refs refs: properly apply exclude patterns to namespaced refs
Diffstat (limited to 'refs.h')
-rw-r--r--refs.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/refs.h b/refs.h
index f2c4ccde61..be03da6d3b 100644
--- a/refs.h
+++ b/refs.h
@@ -861,6 +861,15 @@ int ref_is_hidden(const char *, const char *, const struct strvec *);
*/
const char **hidden_refs_to_excludes(const struct strvec *hide_refs);
+/*
+ * Prefix all exclude patterns with the namespace, if any. This is required
+ * because exclude patterns apply to the stripped reference name, not the full
+ * reference name with the namespace.
+ */
+const char **get_namespaced_exclude_patterns(const char **exclude_patterns,
+ const char *namespace,
+ struct strvec *out);
+
/* Is this a per-worktree ref living in the refs/ namespace? */
int is_per_worktree_ref(const char *refname);