summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-10-17 13:34:42 -0700
committerJunio C Hamano <junkio@cox.net>2005-10-17 13:34:42 -0700
commit25785195eebcd700e854e1bcc89f8d5e711523e2 (patch)
tree34eb607e12bb793fd1c37d0acb032d34ee469dd8
parentb71d01ef3cb9dfc41b32f360c2b10403b37c0e7a (diff)
downloadgit-25785195eebcd700e854e1bcc89f8d5e711523e2.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>
-rw-r--r--quote.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/quote.c b/quote.c
index 357f81a740..92e07f070f 100644
--- a/quote.c
+++ b/quote.c
@@ -75,8 +75,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;