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

Re: [PATCH] ignores: handle non UTF-8 exclude files

From
MBMatthieu Beauchamp <matthieu.beauchamp.boulay@gmail.com>
Date
Jan 6, 2026, 19:52 UTC
Message-ID
<CALH9GrYpWG2WPM76WDFnK-tFFTFtg3hZFLjg3z27gOYKeXpmxw@mail.gmail.com>
In-Reply-To
<xmqqsecmnl3d.fsf@gitster.g>
On Sat, Jan 3, 2026 at 9:54 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 15 quoted lines
>
> "Matthieu Beauchamp-Boulay via GitGitGadget"
> <gitgitgadget@gmail.com> writes:
>
> > From: Matthieu Beauchamp-Boulay <matthieu.beauchamp.boulay@gmail.com>
> >
> > When reading exclude files, git assumes it is encoded in UTF-8 and will
> > fail to apply patterns if it isn't.
>
> Is it true?  I thought we assume that the exclude patters are
> written in such a way to match the encoding of the pathnames,
> whatever used on the platform that our calls to readdir(3) returns.
> Some platforms may have compat/ code to convert these paths and
> force use of UTF-8, but please do not write such platform local
> conventions as if it were universal characteristics of our system.

I believe you are correct, I wrongly assumed git would always manipulate UTF-8 paths. The revision will need to take the platform into consideration.

> "ignores" -> "exclude" on the title, as that is the canonical word
> we use in the codebase to refer to the ignore mechanism.
Thank you, I will update in the revision.
Previous: Junio C HamanoNext: Torsten Bögershausen
Message 3 of 13 in “ignores: handle non UTF-8 exclude files”
  1. ignores: handle non UTF-8 exclude filesMatthieu Beauchamp-Boulay via GitGitGadget, Jan 3, 2026
  2. Junio C HamanoJan 4, 2026
  3. Matthieu BeauchampJan 6, 2026
  4. Torsten BögershausenJan 4, 2026
  5. Matthieu BeauchampJan 6, 2026
  6. Phillip WoodJan 7, 2026
  7. brian m. carlsonJan 4, 2026
  8. Matthieu BeauchampJan 6, 2026
  9. brian m. carlsonJan 6, 2026
  10. Collin FunkJan 7, 2026
  11. Phillip WoodJan 7, 2026
  12. brian m. carlsonJan 7, 2026
  13. Collin FunkJan 8, 2026

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.