diff options
author | Junio C Hamano <junkio@cox.net> | 2005-11-28 22:55:25 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-11-28 22:55:25 -0800 |
commit | 9ef2b3cbf62d15aa0312bde349347873d7c0f399 (patch) | |
tree | 80083c23c526bb58f12fd3895887cf57a8db3a16 /ls-tree.c | |
parent | ffb1a4bed55534e276a0e4fc7dc1c94d17be8579 (diff) | |
download | git-9ef2b3cbf62d15aa0312bde349347873d7c0f399.tar.gz git-9ef2b3cbf62d15aa0312bde349347873d7c0f399.tar.xz |
write_name_quoted(): make one of the path a counted string.
This is to prepare for ls-tree updates.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'ls-tree.c')
-rw-r--r-- | ls-tree.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -157,9 +157,11 @@ static int show_entry(struct tree_entry_list *e, int level, char *pathbuf) int err = 0; if (e != &root_entry) { + int pathlen = strlen(pathbuf); printf("%06o %s %s ", e->mode, entry_type(e), entry_hex(e)); - write_name_quoted(pathbuf, e->name, line_termination, stdout); + write_name_quoted(pathbuf, pathlen, e->name, + line_termination, stdout); putchar(line_termination); } |