summaryrefslogtreecommitdiff
path: root/builtin/rebase.c
diff options
context:
space:
mode:
authorLibravatar René Scharfe <l.s.r@web.de>2019-10-13 14:49:50 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-10-15 10:54:15 +0900
commita81e42d23588188c49f9b6e519f99a734a5aacb9 (patch)
treed7a551b322d1bb6ced8344b0627edc8f801f2643 /builtin/rebase.c
parentGit 2.23 (diff)
downloadtgif-a81e42d23588188c49f9b6e519f99a734a5aacb9.tar.xz
column: use utf8_strnwidth() to strip out ANSI color escapes
Make use of utf8_strnwidth()'s feature to skip ANSI escape sequences instead of open-coding it. This shortens the code and makes it more consistent. This changes the behavior, though: The old code skips all kinds of Control Sequence Introducer sequences, while utf8_strnwidth() only skips the Select Graphic Rendition kind, i.e. those ending with "m". They are used for specifying color and font attributes like boldness. The only other kind of escape sequence we print in Git is Erase in Line, ending with "K". That's not used for columnar output, so this difference actually doesn't matter here. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/rebase.c')
0 files changed, 0 insertions, 0 deletions