summaryrefslogtreecommitdiff
path: root/log-tree.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2016-07-09 14:49:49 +0200
committerJunio C Hamano <gitster@pobox.com>2016-07-12 15:08:26 -0700
commita903e233f65a3e93cad74007cc0d5a178f712263 (patch)
tree7903bb6521141f5b8469ad72b6a8f8120279a3d1 /log-tree.c
parente568e563ade00bbb0937162f405fc160f253e224 (diff)
downloadgit-a903e233f65a3e93cad74007cc0d5a178f712263.tar.gz
log: decorate HEAD -> branch with the same color for arrow and HEADnd/log-decorate-color-head-arrow
Commit 76c61fb (log: decorate HEAD with branch name under --decorate=full, too - 2015-05-13) adds "HEAD -> branch" decoration to show current branch vs detached HEAD. The sign of whether HEAD is detached or not is "->" (vs ",") because the branch is always colored by type. Color the arrow the same as HEAD to visually emphasize that the following branch is HEAD, without paying too much attention to the actual separators "->" or "," Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@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, 0 insertions, 2 deletions
diff --git a/log-tree.c b/log-tree.c
index 01beb11f65..c70f992a96 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -263,8 +263,6 @@ void format_decorations_extended(struct strbuf *sb,
if (current_and_HEAD &&
decoration->type == DECORATION_REF_HEAD) {
- strbuf_addstr(sb, color_reset);
- strbuf_addstr(sb, color_commit);
strbuf_addstr(sb, " -> ");
strbuf_addstr(sb, color_reset);
strbuf_addstr(sb, decorate_get_color(use_color, current_and_HEAD->type));