ls-tree: Resurrect funny name quoting lost during rewrite.
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>
Junio C Hamano committed
Nov 28, 2005 at 02:30 UTC
32b5904b5f94829aa7ae11b585ca9c639d57cc74
1 file changed
+3
-1
ls-tree.c
+3
-1
@@ -48,7 +48,9 @@ static int show_tree(unsigned char *sha1, const char *base, int baselen, const c
48
type = "tree";
49
}
50
51
- printf("%06o %s %s\t%.*s%s%c", mode, type, sha1_to_hex(sha1), baselen, base, pathname, line_termination);
51
+ printf("%06o %s %s\t", mode, type, sha1_to_hex(sha1));
52
+ write_name_quoted(base, baselen, pathname, line_termination, stdout);
53
+ putchar(line_termination);
54
return 0;
55
}
56