From: Junio C Hamano Date: Mon, 17 Oct 2005 20:32:03 +0000 (-0700) Subject: Do not quote SP. X-Git-Tag: v0.99.9~96 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=28fba290e3868a41e36379906407cf318cedfe57;p=git.git 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 --- diff --git a/quote.c b/quote.c index 7df05a9c7..009e69494 100644 --- a/quote.c +++ b/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;