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
diff options
context:
space:
mode:
authorAndy Koppe <andy.koppe@gmail.com>2023-08-20 21:50:09 +0300
committerJunio C Hamano <gitster@pobox.com>2023-08-21 21:40:10 +0300
commit1e63b34a449afd650b02ab19501e8ccf0c15816e (patch)
tree212a9ed1fd9ebbea74a37da459cbde64d7417ec1 /log-tree.c
parentf1f8a258567268974b9bbd012c33ad219a31aa0e (diff)
decorate: use commit color for HEAD arrow
Use the commit color instead of the HEAD color for the arrow or custom symbol in "HEAD -> branch" decorations, for visual consistency with the prefix, separator and suffix symbols, which are also colored with the commit color. This change was triggered by the possibility that one could choose to use the same symbol for the pointer and the separator options in %(decorate), in which case they ought to be the same color. A related precedent is 'ls -l', where the arrow for symlinks gets the default color rather than that of the symlink name. Amend test t4207-log-decoration-colors.sh accordingly. Signed-off-by: Andy Koppe <andy.koppe@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'log-tree.c')
-rw-r--r--log-tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/log-tree.c b/log-tree.c
index 50b4850eda..504da6b519 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -369,7 +369,7 @@ void format_decorations(struct strbuf *sb,
if (current_and_HEAD &&
decoration->type == DECORATION_REF_HEAD) {
- strbuf_addstr(sb, color);
+ strbuf_addstr(sb, color_commit);
strbuf_addstr(sb, pointer);
strbuf_addstr(sb, color_reset);
strbuf_addstr(sb, decorate_get_color(use_color, current_and_HEAD->type));