Re: [Bug report] git status doesn't escape paths of untracked files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"brian m. carlson" <sandals@xxxxxxxxxxxxxxxxxxxx> writes:

> git-status(1) says:
>
>   If a filename contains whitespace or other nonprintable characters,
>   that field will be quoted in the manner of a C string literal:
>   surrounded by ASCII double quote (34) characters, and with interior
>   special characters backslash-escaped.
>
> Note that that differs from the standard behavior of not handling
> spaces, which I expect is due to the need to handle renames
> unambiguously.

Not really.  We use "rename from" and "rename to" extended header
lines in our output to unambiguously handle renamed paths.

cquote was indeed invented to serve "diff" output (actually, nice
things in the internal implementation of Git from the early years
were all invented to serve the diff machinery), but we deliberately
excluded SP from the set of characters that needs quoting because
it was thought to be reasonably common, compared to things like HT.

I agree with your "the special case handling needs to be taught to
the wt_shortstatus_other()"; a refactored helper function called
by both places would help.

Thanks.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux