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:
Diffstat (limited to 'log-tree.c')
-rw-r--r--log-tree.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/log-tree.c b/log-tree.c
index 7c6d3f1ac3..44f4693567 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -342,26 +342,34 @@ void format_decorations(struct strbuf *sb,
* appeared, skipping the entry for current.
*/
if (decoration != current_and_HEAD) {
+ const char *color =
+ decorate_get_color(use_color, decoration->type);
+
if (*prefix) {
strbuf_addstr(sb, color_commit);
strbuf_addstr(sb, prefix);
strbuf_addstr(sb, color_reset);
}
- strbuf_addstr(sb, decorate_get_color(use_color, decoration->type));
- if (decoration->type == DECORATION_REF_TAG)
+ if (decoration->type == DECORATION_REF_TAG) {
+ strbuf_addstr(sb, color);
strbuf_addstr(sb, "tag: ");
+ strbuf_addstr(sb, color_reset);
+ }
+ strbuf_addstr(sb, color);
show_name(sb, decoration);
+ strbuf_addstr(sb, color_reset);
if (current_and_HEAD &&
decoration->type == DECORATION_REF_HEAD) {
+ strbuf_addstr(sb, color);
strbuf_addstr(sb, " -> ");
strbuf_addstr(sb, color_reset);
strbuf_addstr(sb, decorate_get_color(use_color, current_and_HEAD->type));
show_name(sb, current_and_HEAD);
+ strbuf_addstr(sb, color_reset);
}
- strbuf_addstr(sb, color_reset);
prefix = separator;
}