summaryrefslogtreecommitdiff
path: root/t/diff-lib.sh
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2012-09-04 17:39:35 +0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-09-14 12:45:50 -0700
commit754395d3052fc0d46948b2ff7006b3c6701785c8 (patch)
tree501893fca3b18e917ba9ff9ca5a807d2353b4d64 /t/diff-lib.sh
parentPrepare for 1.7.11.6 (diff)
downloadtgif-754395d3052fc0d46948b2ff7006b3c6701785c8.tar.xz
fetch: align per-ref summary report in UTF-8 locales
fetch does printf("%-*s", width, "foo") where "foo" can be a utf-8 string, but width is in bytes, not columns. For ASCII it's fine as one byte takes one column. For utf-8, this may result in misaligned ref summary table. Introduce gettext_width() function that returns the string length in columns (currently only supports utf-8 locales). Make the code use TRANSPORT_SUMMARY(x) where the length is compensated properly in non-English locales. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/diff-lib.sh')
0 files changed, 0 insertions, 0 deletions