diff options
| author | Derrick Stolee <derrickstolee@github.com> | 2022-08-05 17:58:38 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-08-05 14:13:12 -0700 |
| commit | 94d421b8afa0dc46fcd03143f10b4f3828b20104 (patch) | |
| tree | b992b0357133e3fb655789f39f8915a6c4fea50a /builtin/fetch.c | |
| parent | 97e61e0f9cd96f403504ec97cfdf38f238777560 (diff) | |
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 'builtin/fetch.c')
0 files changed, 0 insertions, 0 deletions
