On Tuesday, July 24, 2012 12:29:22 AM UTC+2, Graham Jans wrote:
> Consider this scenario:
> $ touch "a 1.txt"
> $ touch "a 2.txt"
> $ git add "a 1.txt"
> $ git status --porcelain
> A  "a 1.txt"
> ?? a 2.txt
> Note that the added file is properly quoted to account for the space, but 
> the unadded file is not.
> I am using *1.7.11.msysgit.0*. 

I don't know if this is a 1.7.x thing or a msysgit thing, but I'm
running on Debian Linux and tried the following:

$ git init
Initialized empty Git repository in /home/tim/tmp/g/.git/
$ touch "a 1.txt"
$ touch "a 2.txt"
$ touch '"a 3.txt"'
$ ls -lsF
total 0
0 -rw-r--r-- 1 tim tim 0 Jul 24 06:30 "a 3.txt"
0 -rw-r--r-- 1 tim tim 0 Jul 24 06:30 a 1.txt
0 -rw-r--r-- 1 tim tim 0 Jul 24 06:30 a 2.txt
$ git add "a 1.txt"
$ git status --porcelain
A  a 1.txt
?? "\"a 3.txt\""
?? a 2.txt

I don't get quotes around *either* "a 1.txt" or "a 2.txt", but I do
get peculiar quoting around '"a 3.txt"' (NB: I don't believe that
double-quotes are valid filename characters on Windows, so YMMV; and
if you use double-quotes in file-names, you're just asking for trouble)


You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to