Merge branch 'nd/log-decorate-color-head-arrow'
An entry "git log --decorate" for the tip of the current branch is shown as "HEAD -> name" (where "name" is the name of the branch); paint the arrow in the same color as "HEAD", not in the color for commits. * nd/log-decorate-color-head-arrow: log: decorate HEAD -> branch with the same color for arrow and HEAD
This commit is contained in:
commit
3a3338d373
@ -263,8 +263,6 @@ void format_decorations_extended(struct strbuf *sb,
|
|||||||
|
|
||||||
if (current_and_HEAD &&
|
if (current_and_HEAD &&
|
||||||
decoration->type == DECORATION_REF_HEAD) {
|
decoration->type == DECORATION_REF_HEAD) {
|
||||||
strbuf_addstr(sb, color_reset);
|
|
||||||
strbuf_addstr(sb, color_commit);
|
|
||||||
strbuf_addstr(sb, " -> ");
|
strbuf_addstr(sb, " -> ");
|
||||||
strbuf_addstr(sb, color_reset);
|
strbuf_addstr(sb, color_reset);
|
||||||
strbuf_addstr(sb, decorate_get_color(use_color, current_and_HEAD->type));
|
strbuf_addstr(sb, decorate_get_color(use_color, current_and_HEAD->type));
|
||||||
|
@ -44,7 +44,7 @@ test_expect_success setup '
|
|||||||
'
|
'
|
||||||
|
|
||||||
cat >expected <<EOF
|
cat >expected <<EOF
|
||||||
${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_HEAD}HEAD${c_reset}${c_commit} ->\
|
${c_commit}COMMIT_ID${c_reset}${c_commit} (${c_reset}${c_HEAD}HEAD ->\
|
||||||
${c_reset}${c_branch}master${c_reset}${c_commit},\
|
${c_reset}${c_branch}master${c_reset}${c_commit},\
|
||||||
${c_reset}${c_tag}tag: v1.0${c_reset}${c_commit},\
|
${c_reset}${c_tag}tag: v1.0${c_reset}${c_commit},\
|
||||||
${c_reset}${c_tag}tag: B${c_reset}${c_commit})${c_reset} B
|
${c_reset}${c_tag}tag: B${c_reset}${c_commit})${c_reset} B
|
||||||
|
Loading…
Reference in New Issue
Block a user