Xcode 4.2: Git shows UTF-8 files always as untracked

Originator:anaconda.lr
Number:rdar://10460760 Date Originated:17-Nov-2011 07:22 AM
Status:Open Resolved:
Product:Developer Tools Product Version:4.2/4D199
Classification:UI/Usability Reproducible:Always
 
Summary:
Git, included in Xcode 4.1+ for OS X 10.7 (currently running 10.7.2, Xcode 4.2, Git 1.7.5.4), shows UTF-8 tracked files as untracked – this is apparently related to a different  UTF-8 normalization implemented in the HFS+ file system (composed, which most systems use, vs. decomposed).

Apparently Git doesn't care about the file system normalization and UTF-8 files are marked as untracked while they are actually correctly indexed: indeed, if you remove the file, it is marked as deleted.  (That's why I classified this bug as "UI/Usability".)


Steps to Reproduce:
In terminal type:
0. git config --global core.quotepath false    # (optional): don't escape UTF-8 file names (problem persists when this option is true)
1. git clone git://git.torproject.org/https-everywhere.git    # or any other repository known to have an UTF-8 file name
2. cd https-everywhere
3. git status
4. rm -f cert-validity/mozilla/builtin-certs/NetLock_Arany_\=Class_Gold\=_Főtanúsítvány.crt
5. git status


Expected Results:
Step #3 (git status) should produce the following output:
# On branch master
nothing to commit (working directory clean)


Actual Results:
Step #3 (git status) produces the following output:
# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#	cert-validity/mozilla/builtin-certs/NetLock_Arany_=Class_Gold=_Főtanúsítvány.crt
nothing added to commit but untracked files present (use "git add" to track)


Notes:
As I said, this problem is not directly related to Xcode (i.e., not something you introduced while integrating Git in Xcode), it is included in Git, in any version, as far as I know (a Google search confirms it), but you should at least patch the version included in Xcode.

I'd be very happy if you could also contribute your patch to the Git open source project (see https://raw.github.com/git/git/master/Documentation/SubmittingPatches for informations on how to contribute patches).

Comments

The problem persists with Git 1.7.7, self compiled.

By anaconda.lr at Nov. 17, 2011, 6:35 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!