Skip to content

Commit 28fba29

Browse files
author
Junio C Hamano
committed
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>
1 parent 58452f9 commit 28fba29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

quote.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ int quote_c_style(const char *name, char *outbuf, FILE *outfp, int no_dq)
8888
EMIT('"');
8989
for (sp = name; (ch = *sp++); ) {
9090

91-
if ((ch <= ' ') || (ch == '"') ||
92-
(ch == '\\') || (ch == 0177)) {
91+
if ((ch < ' ') || (ch == '"') || (ch == '\\') ||
92+
(ch == 0177)) {
9393
needquote = 1;
9494
switch (ch) {
9595
case '\a': EMITQ(); ch = 'a'; break;

0 commit comments

Comments
 (0)