author | Geoffrey Thomas <geofft@mit.edu> | |
Fri, 30 Jan 2009 09:41:29 +0000 (04:41 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 5 Feb 2009 00:30:45 +0000 (16:30 -0800) | ||
commit | ffaf9cc0ff0692a0b60cdf1b62e8375706b7865d | |
tree | 75d149e32e00203614f2395bd76559928861bde1 | tree | snapshot |
parent | 8a9391e9440028c03345afa9f21459237a529592 | commit | diff |
builtin-blame.c: Use utf8_strwidth for author's names
git blame misaligns output if a author's name has a differing display width and
strlen; for instance, an accented Latin letter that takes two bytes to encode
will cause the rest of the line to be shifted to the left by one. To fix this,
use utf8_strwidth instead of strlen (and compute the padding ourselves, since
printf doesn't know about UTF-8).
Signed-off-by: Geoffrey Thomas <geofft@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git blame misaligns output if a author's name has a differing display width and
strlen; for instance, an accented Latin letter that takes two bytes to encode
will cause the rest of the line to be shifted to the left by one. To fix this,
use utf8_strwidth instead of strlen (and compute the padding ourselves, since
printf doesn't know about UTF-8).
Signed-off-by: Geoffrey Thomas <geofft@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-blame.c | diff | blob | history |