为什么Git将Unicode显示为二进制?

3
为什么git status和相关工具将文件名中的Unicode视为二进制?
[991]anarcat@marcos:test$ git init foo
Dépôt Git vide initialisé dans /home/anarcat/test/foo/.git/
[992]anarcat@marcos:test$ cd foo
[993]anarcat@marcos:foo$ touch hé
[994]anarcat@marcos:foo$ git add hé
[996]anarcat@marcos:foo$ git status --porcelain
A  "h\303\251"

我期望这将是:

A hé

Git在文件的内容中可以很好地处理重音符号和Unicode,为什么文件名是特别的呢?

1个回答

6

默认情况下,Git 会使用带引号的八进制表示法打印非 ASCII 文件名。您可以禁用此功能。

git config --global core.quotepath off

这正是我正在寻找的,谢谢René! :) 我希望这是默认设置...至少git应该尊重我的语言环境... - anarcat

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接