]> git.ipfire.org Git - thirdparty/git.git/commit
decorate: color each token separately
authorAndy Koppe <andy.koppe@gmail.com>
Sun, 20 Aug 2023 18:50:06 +0000 (19:50 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 21 Aug 2023 18:40:09 +0000 (11:40 -0700)
commitdcb347f83780b67ba586fda67a5c494b31354eae
treebee602b08027ef4bc3178569c793ccfde9f38ee2
parentb87a9a2c1ef8c39d4fc3d1e28ebb79563d4804be
decorate: color each token separately

Wrap "tag:" prefixes and the arrows in "HEAD -> branch" decorations in
their own color sequences. Otherwise, if --graph is used, tag names or
arrows can end up uncolored when %w width formatting breaks a line just
before them. This is because --graph resets the color after doing its
drawing at the start of a line.

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>
log-tree.c
t/t4207-log-decoration-colors.sh