git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Brian Gernhardt <benji@silverinsanity.com>
Date
Feb 3, 2007, 20:12 UTC
Message-ID
<F16FE131-CF33-4DD0-9A06-4A24C59C7623@silverinsanity.com>
In-Reply-To
<7v4pq358q4.fsf@assigned-by-dhcp.cox.net>
On Feb 3, 2007, at 2:42 PM, Junio C Hamano wrote:
Show 8 quoted lines
> 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
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 17 in “t9200 still failing...”
  1. Brian GernhardtFeb 3, 2007
  2. Wolfgang FischerFeb 3, 2007
  3. Brian GernhardtFeb 3, 2007
  4. Use "-f" when adding files with odd names in t9200.Brian Gernhardt, Feb 3, 2007
  5. Junio C HamanoFeb 3, 2007
  6. Brian GernhardtFeb 3, 2007
  7. Junio C HamanoFeb 3, 2007
  8. Brian GernhardtFeb 3, 2007
  9. Junio C HamanoFeb 3, 2007
  10. Junio C HamanoFeb 4, 2007
  11. Shawn O. PearceFeb 4, 2007
  12. Brian GernhardtFeb 4, 2007
  13. Brian GernhardtFeb 4, 2007
  14. Junio C HamanoFeb 5, 2007
  15. Brian GernhardtFeb 5, 2007
  16. Brian GernhardtFeb 6, 2007
  17. Brian GernhardtFeb 3, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.