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, 21:31 UTC
Message-ID
<A9623793-111E-47F7-9709-1D569333C40C@silverinsanity.com>
In-Reply-To
<7vabzv3qxi.fsf@assigned-by-dhcp.cox.net>
On Feb 3, 2007, at 3:51 PM, Junio C Hamano wrote:
> A filesystem that reports success on creat(path) and then does
> not return that path to later readdir() from that directory is
> broken from git's point of view.  At least that has been the
> definition so far.

I agree, it's fairly idiotic and obtuse. By using the great Google, I've seen lots of other people complaining about it as well.

> I am not sure offhand the implications of the change you propose
> to make to match_one(), but it could also be the place to handle
> case-challenged filesystems.

I would simply like match_one to agree with the file system as to what is a match. On OS X that would mean that both normalized forms of UTF-8 match. I'm trying it as a proof-of-concept mostly to see what kind of effects it would have. match_one only seems to be used in match_pathspec, which is only used by add and rm... And I think that getting it to match the behavior of the OS would make things less surprising for the user.

Show 7 quoted lines
> But even if you do that, I wonder what your plan would be to
> handle something like "git add .".  read_directory_recursive()
> asks readdir() for existing pathnames, and we expect that can be
> used as parameter to add_file_to_index and then eventually we
> can call creat() or symlink() with it, so it also needs to be
> taught to behave consistently with respect to what your updated
> match_one() does.

"git add ." works just fine, as it reads the name of the file from disk which is already in the form HFS+ accepts. The only confusion exists when comparing data from the user to data from disk.

In any case, I don't appear to understand the proper incantations to bend ICU to my will, as it either doesn't change anything or breaks git completely. Perhaps further attempts will help, but my lack of experience with the API is a serious hinderance, and I can't find any other way to do the normalization.

~~ Brian
Previous: Junio C HamanoNext: Junio C Hamano
Message 8 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.