@matheusbsbs / matheus-bagliano / commits / 25785195ee
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:34 UTC 25785195eebcd700e854e1bcc89f8d5e711523e2
1 file changed +2 -2
quote.c
+2 -2
@@ -75,8 +75,8 @@ int quote_c_style(const char *name, char *outbuf, FILE *outfp, int no_dq)
75 EMIT('"');
76 for (sp = name; (ch = *sp++); ) {
77
78 - if ((ch <= ' ') || (ch == '"') ||
79 - (ch == '\\') || (ch == 0177)) {
78 + if ((ch < ' ') || (ch == '"') || (ch == '\\') ||
79 + (ch == 0177)) {
80 needquote = 1;
81 switch (ch) {
82 case '\a': EMITQ(); ch = 'a'; break;