summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b71d01e)
raw | patch | inline | side by side (parent: b71d01e)
author | Junio C Hamano <junkio@cox.net> | |
Mon, 17 Oct 2005 20:34:42 +0000 (13:34 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 17 Oct 2005 20:34:42 +0000 (13:34 -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 357f81a740aaed18632023b2f29137773e58eaf7..92e07f070ff54be3f5d0ca02582a7c9e1fd1fa53 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;