diff options
author | Junio C Hamano <junkio@cox.net> | 2005-10-17 13:32:03 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-10-17 17:41:58 -0700 |
commit | 28fba290e3868a41e36379906407cf318cedfe57 (patch) | |
tree | f52f95c171f6e4fa26db57a0a8d4d7aef80bb777 /quote.c | |
parent | 58452f9442a1fa20e0fde5d200091b7f02e62cea (diff) | |
download | git-28fba290e3868a41e36379906407cf318cedfe57.tar.gz git-28fba290e3868a41e36379906407cf318cedfe57.tar.xz |
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>
Diffstat (limited to 'quote.c')
-rw-r--r-- | quote.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |