aboutsummaryrefslogtreecommitdiffstats
path: root/commit-graph.c
diff options
context:
space:
mode:
authorDerrick Stolee <derrickstolee@github.com>2022-08-05 17:58:38 +0000
committerJunio C Hamano <gitster@pobox.com>2022-08-05 14:13:12 -0700
commit94d421b8afa0dc46fcd03143f10b4f3828b20104 (patch)
treeb992b0357133e3fb655789f39f8915a6c4fea50a /commit-graph.c
parentrefs: use ref_namespaces for replace refs base (diff)
downloadgit-94d421b8afa0dc46fcd03143f10b4f3828b20104.tar.gz
git-94d421b8afa0dc46fcd03143f10b4f3828b20104.zip
log-tree: use ref_namespaces instead of if/else-if
The add_ref_decoration() method uses an if/else-if chain to determine if a ref matches a known ref namespace that has a special decoration category. That decoration type is later used to assign a color when writing to stdout. The newly-added ref_namespaces array contains all namespaces, along with information about their decoration type. Check this array instead of this if/else-if chain. This reduces our dependency on string literals being embedded in the decoration logic. Signed-off-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.c')
0 files changed, 0 insertions, 0 deletions