mirror of
https://github.com/git/git
synced 2024-08-25 02:35:46 +00:00
Do not quote SP.
Follow the "encode minimally" principle -- our tools, including git-apply and git-status, can handle pathnames with embedded SP just fine. The only problematic ones are TAB and LF, and we need to quote the metacharacters introduced for quoting. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
58452f9442
commit
28fba290e3
4
quote.c
4
quote.c
|
@ -88,8 +88,8 @@ int quote_c_style(const char *name, char *outbuf, FILE *outfp, int no_dq)
|
|||
EMIT('"');
|
||||
for (sp = name; (ch = *sp++); ) {
|
||||
|
||||
if ((ch <= ' ') || (ch == '"') ||
|
||||
(ch == '\\') || (ch == 0177)) {
|
||||
if ((ch < ' ') || (ch == '"') || (ch == '\\') ||
|
||||
(ch == 0177)) {
|
||||
needquote = 1;
|
||||
switch (ch) {
|
||||
case '\a': EMITQ(); ch = 'a'; break;
|
||||
|
|
Loading…
Reference in a new issue