log-tree: make ref_filter_match() a helper method
commitc9f7a793e81f517593383768ec8839dac85368c4
authorDerrick Stolee <dstolee@microsoft.com>
Thu, 16 Apr 2020 14:15:48 +0000 (16 14:15 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 16 Apr 2020 18:04:55 +0000 (16 11:04 -0700)
treee9767ae9828ed510bb28a36be8444a87e7969ebf
parentefe3874640e2e58209ddbb3b072f48f6b7094f34
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>
log-tree.c
refs.c
refs.h