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

Re: [PATCH] [RFC] Design for pathname encoding gitattribute [RESEND]

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 22, 2008, 06:26 UTC
Message-ID
<7vlk6iv0ik.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080122050215.DE198200A2@wilber.wgtn.cat-it.co.nz>
Sam Vilain <sam.vilain@catalyst.net.nz> writes:
Show 7 quoted lines
> Some projects may like to enforce a particular encoding is used for
> all filenames in the repository.  Within the UTF-8 encoding, there are
> four normal forms (see http://unicode.org/reports/tr15/), any of which
> may be a reasonable repository format choice.  Additionally, some
> filesystems may have a single encoding that they support when writing
> local filenames.  To support this, iconv and a normalization library
> must have the information they need to perform the correct conversion.

Isn't there a chicken-and-egg problem? The attributes are by nature per-path, and you need to match the pathname string with a pattern to decide which attribute definition to apply to a given path. Before knowing what encoding the pathname you have just read from readdir(3), how would you match that pathname with the pattern in the gitattributes file?

I can buy the .git/config (and an in-tree .git-encoding, perhaps), though.

Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 11 in “[RFC] Design for pathname encoding gitattribute [RESEND]”
  1. [RFC] Design for pathname encoding gitattribute [RESEND]Sam Vilain, Jan 22, 2008
  2. Johannes SchindelinJan 22, 2008
  3. Junio C HamanoJan 22, 2008
  4. Junio C HamanoJan 22, 2008
  5. Junio C HamanoJan 22, 2008
  6. Mark JunkerJan 22, 2008
  7. Junio C HamanoJan 22, 2008
  8. Rafael Garcia-SuarezJan 22, 2008
  9. Sam VilainJan 22, 2008
  10. Junio C HamanoJan 22, 2008
  11. Sam VilainJan 22, 2008

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.