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

[bug] git-check-ignore and file names with unicode chars in name - sys-out filename is corrupted

From
PHPaul Hammant <paul@hammant.org>
Date
Aug 9, 2016, 05:47 UTC
Message-ID
<CA+298UiKf6heNPy-NZSfdx47jyS_aK+C8UX3vh6OB3_XE+pn=g@mail.gmail.com>
Reproduction:
  $ echo "*.ignoreme" >> .gitignore
  # (and commit)
  $ touch "fooo-€.ignoreme"
  $ find . -print | grep fooo | xargs git check-ignore
  "./fooo-\342\202\254.ignoreme"

You could view that git-check-ignore isn't corrupting anything, it is just outputting another form for the file name (octal escaped), but it doesn't need to change it at all, and its causing downstream problems in bash scripting.

Of course this may get munged by gmail or a list manager. In the text above, you should see unicode char "euro sign" to the right of a dash, and the left of .ignoreme

Git version is 2.9.2
-ph
Next: Jeff King
Message 1 of 2 in “[bug] git-check-ignore and file names with unicode chars in name - sys-out filename is corrupted”
  1. Paul HammantAug 9, 2016
  2. Jeff KingAug 9, 2016

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.