From 78a766ab6eaaa91c2638158bd4fda06a93291da0 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Tue, 3 Nov 2015 08:58:16 +0100 Subject: hideRefs: add support for matching full refs In addition to matching stripped refs, one can now add hideRefs patterns that the full (unstripped) ref is matched against. To distinguish between stripped and full matches, those new patterns must be prefixed with a circumflex (^). This commit also removes support for the undocumented and unintended hideRefs settings ".have" (suppressing all "have" lines) and "capabilities^{}" (suppressing the capabilities line). Signed-off-by: Lukas Fleischer Signed-off-by: Junio C Hamano --- refs.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'refs.h') diff --git a/refs.h b/refs.h index 6d30c980d1..7a04077489 100644 --- a/refs.h +++ b/refs.h @@ -444,7 +444,15 @@ int update_ref(const char *msg, const char *refname, extern int parse_hide_refs_config(const char *var, const char *value, const char *); -extern int ref_is_hidden(const char *); +/* + * Check whether a ref is hidden. If no namespace is set, both the first and + * the second parameter point to the full ref name. If a namespace is set and + * the ref is inside that namespace, the first parameter is a pointer to the + * name of the ref with the namespace prefix removed. If a namespace is set and + * the ref is outside that namespace, the first parameter is NULL. The second + * parameter always points to the full ref name. + */ +extern int ref_is_hidden(const char *, const char *); enum ref_type { REF_TYPE_PER_WORKTREE, -- cgit v1.3-5-g9baa