git-fame
git-fame copied to clipboard
When author name contains Chinese characters, redundant spaces added.
git-fame-1.14.0, zsh and bash both found this problem.
When git repo author name contains both ascii and Chinese characters, redundant spaces added for Chinese characters.
You could use different Chinese character length to test: such like "张三丰", "李四", different character lengths could got different redutant spaces
@truebit / @waldyrious what OS & python versions are you using? I can't reproduce this (Ubuntu 16.04/18.04/20.04, Python 2.7/3).
I'm on Ubuntu 20.04, and my python version is 3.9.6.
super odd. And I assume you're using git-fame==1.15? Can you try the unilen branch instead?
pip install "git+https://github.com/casperdcl/git-fame.git@unilen#egg=git-fame"
And I assume you're using
git-fame==1.15?
Yes:
$ git fame --version
1.15.0
Can you try the
unilenbranch instead?
Sure, but it doesn't seem to help :(

Interestingly, on GitHub the misalignment goes the other way:
:
| Matt Singletary | 85 | 1 | 2 | 0.0/ 0.0/ 0.0 |
| Crestwave | 74 | 1 | 2 | 0.0/ 0.0/ 0.0 |
| 조성빈 | 73 | 1 | 3 | 0.0/ 0.0/ 0.1 |
| Batuhan Taskaya | 72 | 1 | 6 | 0.0/ 0.0/ 0.1 |
| Yorwba | 70 | 8 | 9 | 0.0/ 0.1/ 0.2 |
:
What happens on your side? In my terminal "조성빈" is printed with each character taking up the space of two regular-width characters, so it in my terminal, so they align with "Crestw" from the line above, and with "Batuha" from the line below.
If you do echo '|123456 123456|'; echo '|조성빈 조성빈|'; echo '|123456 123456|', does the output look aligned for you? It does for me:

Although here on GitHub that doesn't seem to be the case:
$ echo '|123456 123456|'; echo '|조성빈 조성빈|'; echo '|123456 123456|'
|123456 123456|
|조성빈 조성빈|
|123456 123456|
I tested swapping the font of my terminal to DejaVu Mono, FreeMono, Liberation Mono, Noto Mono, Ubuntu Mono and Unifont, and in all cases the effect was the same (the text is aligned).
on git-fame 1.15, the misalign problem fixed on my MBP. BTW, i use iTerm with Powerlevel10k and on macOS Big Sur 11.4