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

Re: git log and utf-u in filenames

From
Jakub Narebski <jnareb@gmail.com>
Date
Sep 25, 2008, 23:15 UTC
Message-ID
<m3fxnn3ji6.fsf@localhost.localdomain>
In-Reply-To
<20080925224354.GA6072@kodama.kitenet.net>
Joey Hess <joey@kitenet.net> writes:
> Joey Hess wrote:
Show 11 quoted lines
> > And did earlier versions of git (circa 2006) perhaps not do that
> > escaping? I have code in ikiwiki that apparently used to work, but
> > is certianly not working with current git, due to this escaping.
> 
> No, I guess it's always done that, perhaps something broke on my side
> in the meantime.
> 
> But it doesn't seem right somehow that gitweb, ikiwiki, and seemingly
> any other program that needs to look at git log / commits and figure out
> what filename is being changed needs to include their own nasty code[1] to
> convert the escaped characters back to normal characters.

Well, in gitweb we could use '-z' option for git-diff-tree and git-ls-tree, but it has its disadvantages, like having to do actual parsing record after record instead of simplys splitting outout on end of line ("\n") characters.

> Would making git-log and git-commit display de-escaped filenames be likely
> to break something?

core.quotepath limits filename escaping, but you still _have_ to quote "\n", "\t", and of course '"' and '\', if you want for filename to have in single line in text format.

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Joey HessNext: Alex Riesen
Message 3 of 8 in “git log and utf-u in filenames”
  1. Joey HessSep 25, 2008
  2. Joey HessSep 25, 2008
  3. Jakub NarebskiSep 25, 2008
  4. Alex RiesenSep 26, 2008
  5. Jakub NarebskiSep 26, 2008
  6. Alex RiesenSep 26, 2008
  7. Jakub NarebskiSep 27, 2008
  8. Jakub NarebskiSep 25, 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.