Skip to content

Commit

Permalink
ls-tree: Resurrect funny name quoting lost during rewrite.
Browse files Browse the repository at this point in the history
The rewrite to match ls-files/diff-tree behaviour accidentally
lost the name quoting.  I am not proud about this code, but this
would get the test going.

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Nov 29, 2005
1 parent e246637 commit 32b5904
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ls-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ static int show_tree(unsigned char *sha1, const char *base, int baselen, const c
type = "tree";
}

printf("%06o %s %s\t%.*s%s%c", mode, type, sha1_to_hex(sha1), baselen, base, pathname, line_termination);
printf("%06o %s %s\t", mode, type, sha1_to_hex(sha1));
write_name_quoted(base, baselen, pathname, line_termination, stdout);
putchar(line_termination);
return 0;
}

Expand Down

0 comments on commit 32b5904

Please sign in to comment.