MacのGitは1.8.5からcore.precomposeunicode = trueがデフォルト

MacでGitを使うに当たって

git 1.7.12でUTF8-MAC問題が解決 | Butaman-kun Project

ちなみに、このバージョンでgit cloneやgit initすると、リポジトリの設定として「core.precomposeunicode」が明示的にfalseとなっているため、global設定を変えても反映されない。

上記の記事が書かれてから1年半経っているし、そろそろ最初からtrueになっていても良いのではないかと、git version 1.8.5.2 (Apple Git-48)でgit initしてみたら、なってた。

リリースノートを眺める限りでは、git 1.8.5からそうなっているらしい。

https://raw.github.com/git/git/master/Documentation/RelNotes/1.8.5.txt

  • On MacOS X, we detected if the filesystem needs the "pre-composed unicode strings" workaround, but did not automatically enable it. Now we do.

確認のため、Homebrewでgit 1.8.4.3とgit 1.8.5を入れ、git init直後の.git/configを見比べてみる。

git 1.8.4.3

[core]
  repositoryformatversion = 0
  filemode = true
  bare = false
  logallrefupdates = true
  ignorecase = true
  precomposeunicode = false

git 1.8.5

[core]
  repositoryformatversion = 0
  filemode = true
  bare = false
  logallrefupdates = true
  ignorecase = true
  precomposeunicode = true