Skip to content

Commit

Permalink
Do not quote SP.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Oct 18, 2005
1 parent 58452f9 commit 28fba29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions quote.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 28fba29

Please sign in to comment.