You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
git log show correctly encoded subject only for predefined pretty format - oneline, full etc.
When pretty uses custom string such as "%s" it should also use "%e" (commit encoding), then do recoding from commit encoding to repo's logOutputEncoding (perhaps to utf8 first).
Or magit can use something like
git log --pretty=oneline | cut -d ' ' -f 2
leaving internal encodings to git.
git log show correctly encoded subject only for predefined pretty format - oneline, full etc.
When pretty uses custom string such as "%s" it should also use "%e" (commit encoding), then do recoding from commit encoding to repo's logOutputEncoding (perhaps to utf8 first).
Or magit can use something like
git log --pretty=oneline | cut -d ' ' -f 2
leaving internal encodings to git.
How to reprocude:
$ locale
LANG=ru_RU.CP1251
LC_CTYPE="ru_RU.CP1251"
LC_NUMERIC="ru_RU.CP1251"
LC_TIME="ru_RU.CP1251"
LC_COLLATE="ru_RU.CP1251"
LC_MONETARY="ru_RU.CP1251"
LC_MESSAGES="ru_RU.CP1251"
LC_PAPER="ru_RU.CP1251"
LC_NAME="ru_RU.CP1251"
LC_ADDRESS="ru_RU.CP1251"
LC_TELEPHONE="ru_RU.CP1251"
LC_MEASUREMENT="ru_RU.CP1251"
LC_IDENTIFICATION="ru_RU.CP1251"
LC_ALL=
$ mkdir git-subject-bug
$ cd git-subject-bug
$ git init
Initialized empty Git repository in .../git-subject-bug/.git/
$ touch test
$ git add .
$ git config i18n.commitEncoding cp1251
$ git config i18n.logOutputEncoding cp1251
Do commit with non latin message
$ git commit -a -m "Тест"
$ export LANG=ru_RU.UTF-8
$ git config i18n.logOutputEncoding utf8
$ git config i18n.commitEncoding utf8
Run xterm with new locale settings
$ xterm
Readable output
$ git log --pretty=oneline
Broken encoding
$ git log --pretty="%H %s"
The text was updated successfully, but these errors were encountered: