# Color "graph".
$prefix =~ s/\|/colored($&, $color_graph)/ge;
- # Strip leading whitespace.
+ # Strip leading whitespace and braces.
$refs =~ s/^\s+//;
+ $refs =~ tr/()//d;
+
+ # Color refs.
+ $refs = join colored(', ', $color_ref_sep), map {
+ my $color;
+ if ($_ eq 'HEAD') {
+ $color = $color_ref_head;
+ } elsif (m{/}) {
+ $color = $color_ref_reference;
+ } else {
+ $color = $color_ref_branch;
+ }
+ colored($_, $color);
+ } split /, /, $refs;
if ($refs ne '') {
- $refs = ' ' . $refs;
+ $refs = ' '
+ . colored('(', $color_ref_sep)
+ . $refs
+ . colored(')', $color_ref_sep);
}
printf "%s %s %s %s%s %s\n",