Re: [PATCH] Use "-f" when adding files with odd names in t9200.

From: Brian Gernhardt <benji@silverinsanity.com>
Date: 2007-02-04 07:12:09
On Feb 3, 2007, at 2:42 PM, Junio C Hamano wrote:

> Can you describe why git-add finds the (presumably mangled by
> HFS) path in ".gitignore"?  If we had some default pattern in
> info/exclude that is installed in the trash test repository I
> would understand that a mangled path could happen to match it,
> but I do not think we do not have any exclude pattern by
> default.
>
> Unless/until you know why git-add thinks it is ignored,...

It occurs because of the normalization issue on HFS+.  git-add  
compares the pathspecs given on the command line to a directory tree  
read from disk.  The pathspec is in NFC, and the tree is in NFD.   
When it tries to find the pathspec in the tree, it fails because of  
that.  When it checks to see if the file exists, HFS+ converts the  
pathspec to NFD transparently.  And since the file exists, but wasn't  
read by read_directory, git thinks it was because of an ignore file.

> ... I think this change means you are installing something the
> existing test knows to be broken, which is not very pretty.

The test finds that the ignore code is slightly broken on HFS+, which  
is not what it thinks it's testing.  And since the ignore files are  
empty, it should not adversely affect any other platforms.

The only solution I can think of is to make dir.c:match_one() unicode- 
aware.  Which I'm working on to see if it will work, but don't know  
if you want to include that complication.

~~ Brian
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Sun Feb 04 07:16:14 2007

This archive was generated by hypermail 2.1.8 : 2007-02-04 07:18:02 EST