Skip to content

Commit 4c7f0e1

Browse files
committed
normalize names if iconv available to unfuck printf
1 parent 54dbc41 commit 4c7f0e1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

git-rank

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,8 @@ printf "\n%-40s %9s %9s %9s %9s %9s\n\n" Author Commits Added Removed Total Modi
1212

1313
git shortlog -s -n | while read commits name; do
1414
read added removed total modified < <(git author-stats --num "$name")
15+
if type iconv >/dev/null 2>&1; then
16+
name=$(echo $name | iconv -f utf-8 -t ascii//translit)
17+
fi
1518
printf "%-40s %9s $G%9s $R%9s $Y%9s $B%9s$Z\n" "$name" $commits $added $removed $total $modified
1619
done

0 commit comments

Comments
 (0)