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

Problem listing GIT repository with accents

From
EPEllié Computing Open Source Program <opensource@elliecomputing.com>
Date
Feb 1, 2010, 10:48 UTC
Message-ID
<7E88665723814E46BCBA1A39E84C27A5@elrond>
Dear all,

I'm writing a tool (ECMerge) which use the git command line to list folders content (as of specific commits, tags and so on). This way our users can browse a GIT repository in our GUI.

We are in front of the following problem: when a GIT repository contains a folder with accents, the files names for its content are often prepended with random characters. Here is a transcript of a list of operation exhibiting the problem:

 C:\temp\scc-tests\git>git ls-tree HEAD .
100644 blob 443d8625f771c421efd86c129483f9a139a4e85f    "p\351p\351.txt"
C:\temp\scc-tests\git>mkdir "caractère spécial"
C:\temp\scc-tests\git>echo plouf > "caractère spécial\plouf.txt"
C:\temp\scc-tests\git>git add "caractère spécial"
C:\temp\scc-tests\git>git commit -m plouf
[master b94d9cb] plouf
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 "caract\350re sp\351cial/plouf.txt"

C:\temp\scc-tests\git>git ls-tree HEAD . 040000 tree d2b614bbfb4c5f39a32eb1309654262df113f605 "caract\350re sp\351cial" 100644 blob 443d8625f771c421efd86c129483f9a139a4e85f "p\351p\351.txt"

C:\temp\scc-tests\git>git ls-tree -r HEAD . 100644 blob bf10a8b39e72c754ee1872fcdb13662cba6a8880 "caract\350re sp\351cial/\272plouf.txt" 100644 blob 443d8625f771c421efd86c129483f9a139a4e85f "p\351p\351.txt"

C:\temp\scc-tests\git>git ls-tree -r HEAD "caractère spécial" 100644 blob bf10a8b39e72c754ee1872fcdb13662cba6a8880 "caract\350re sp\351cial/\272plouf.txt"

Note the spurious \272 which comes in the listing :( Trying again the same commands may give other spurious characters (each time we tried we get different _bad_ responses)

Hope you can do somehing for that, Best regards Armel Asselin - from Ellié Computing

Next: Jeff King
Message 1 of 8 in “Problem listing GIT repository with accents”
  1. Ellié Computing Open Source ProgramFeb 1, 2010
  2. Jeff KingFeb 1, 2010
  3. Jeff KingFeb 1, 2010
  4. Johannes SixtFeb 1, 2010
  5. Jeff KingFeb 1, 2010
  6. Jeff KingFeb 1, 2010
  7. Junio C HamanoFeb 1, 2010
  8. Jeff KingFeb 1, 2010

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.