Subject: Re: BUG: "git add --interactive" does not work with UTF-8 filenames

From: Jakub Narebski <[email-masked]>
Date: Wed, 2 Apr 2008 12:17:14 +0100

Junio C Hamano wrote:
> Jakub Narebski <[email-masked]> writes:
> 
> > git-config(1):
> >
> >   core.quotepath::
> > 	The commands that output paths (e.g. `ls-files`,
> > 	`diff`), when not given the `-z` option, will quote
> > 	"unusual" characters in the pathname by enclosing the
> > 	pathname in a double-quote pair and with backslashes the
> > 	same way strings in C source code are quoted.  If this
> > 	variable is set to false, the bytes higher than 0x80 are
> > 	not quoted but output as verbatim.  Note that double
> > 	quote, backslash and control characters are always
> > 	quoted without `-z` regardless of the setting of this
> > 	variable.
> >
> > Since 1.5.2.2 (I think), or at least 1.5.3, so you have new enough
> > version of git (git is now at 1.5.5-rc2).
> 
> Yes, but I do not think "add -i" unwraps the path quoting.  I think it
> should, but I do not think I bothered to.  Because it is trivial to do by
> any aspiring git hacker wannabes, I left it as an exercise to readers when
> I did the "interactive" as a quick-and-dirty hack (aka "demonstration").

By the way, the code to unwrap the path quoting can be found in gitweb
as unescape() subroutine... or git-add--interactive can use '-z' switch.

-- 
Jakub Narebski
Poland