summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 58452f9)
raw | patch | inline | side by side (parent: 58452f9)
author | Junio C Hamano <junkio@cox.net> | |
Mon, 17 Oct 2005 20:32:03 +0000 (13:32 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 18 Oct 2005 00:41:58 +0000 (17:41 -0700) |
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>
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>
quote.c | patch | blob | history |
index 7df05a9c7c0935170acd84105289fe531da7f7c3..009e69494b007fc7bfe590029c144d9ce41aa6b5 100644 (file)
--- a/quote.c
+++ b/quote.c
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;