@matheusbsbs / matheus-bagliano / commits / 28fba290e3
Fork 0

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>

Junio C Hamano committed Oct 17, 2005 at 13:32 UTC 28fba290e3868a41e36379906407cf318cedfe57
1 file changed +2 -2
quote.c
+2 -2
@@ -88,8 +88,8 @@ int quote_c_style(const char *name, char *outbuf, FILE *outfp, int no_dq)
88 EMIT('"');
89 for (sp = name; (ch = *sp++); ) {
90
91 - if ((ch <= ' ') || (ch == '"') ||
92 - (ch == '\\') || (ch == 0177)) {
91 + if ((ch < ' ') || (ch == '"') || (ch == '\\') ||
92 + (ch == 0177)) {
93 needquote = 1;
94 switch (ch) {
95 case '\a': EMITQ(); ch = 'a'; break;