diff --git a/ls-tree.c b/ls-tree.c
index dd642e0bf059cdf969d370fc1155fb189a0c89ce..d9f15e349cb833401eea38d21fb050b10f9678d4 100644 (file)
--- a/ls-tree.c
+++ b/ls-tree.c
#include "cache.h"
#include "blob.h"
#include "tree.h"
+#include "quote.h"
static int line_termination = '\n';
#define LS_RECURSIVE 1
int err = 0;
if (e != &root_entry) {
- printf("%06o %s %s %s%s", e->mode, entry_type(e),
- entry_hex(e), pathbuf, e->name);
+ printf("%06o %s %s ",
+ e->mode, entry_type(e), entry_hex(e));
+ write_name_quoted(pathbuf, e->name, line_termination, stdout);
putchar(line_termination);
}