Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/refs.h
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2020-04-16 17:15:48 +0300
committerJunio C Hamano <gitster@pobox.com>2020-04-16 21:04:55 +0300
commitc9f7a793e81f517593383768ec8839dac85368c4 (patch)
treee9767ae9828ed510bb28a36be8444a87e7969ebf /refs.h
parentefe3874640e2e58209ddbb3b072f48f6b7094f34 (diff)
log-tree: make ref_filter_match() a helper method
The ref_filter_match() method is defined in refs.h and implemented in refs.c, but is only used by add_ref_decoration() in log-tree.c. Move it into that file as a static helper method. The match_ref_pattern() comes along for the ride. While moving the code, also make a slight adjustment to have ref_filter_match() take a struct decoration_filter pointer instead of multiple string lists. This is non-functional, but will make a later change be much cleaner. The diff is easier to parse when using the --color-moved option. Reported-by: Junio C Hamano <gister@pobox.com> Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.h')
-rw-r--r--refs.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/refs.h b/refs.h
index 545029c6d8..a92d2c74c8 100644
--- a/refs.h
+++ b/refs.h
@@ -361,18 +361,6 @@ int for_each_rawref(each_ref_fn fn, void *cb_data);
void normalize_glob_ref(struct string_list_item *item, const char *prefix,
const char *pattern);
-/*
- * Returns 0 if refname matches any of the exclude_patterns, or if it doesn't
- * match any of the include_patterns. Returns 1 otherwise.
- *
- * If pattern list is NULL or empty, matching against that list is skipped.
- * This has the effect of matching everything by default, unless the user
- * specifies rules otherwise.
- */
-int ref_filter_match(const char *refname,
- const struct string_list *include_patterns,
- const struct string_list *exclude_patterns);
-
static inline const char *has_glob_specials(const char *pattern)
{
return strpbrk(pattern, "?*[");