projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
git-apply: work from subdirectory.
[git.git]
/
ls-tree.c
diff --git
a/ls-tree.c
b/ls-tree.c
index
d9f15e3
..
d7c7e75
100644
(file)
--- a/
ls-tree.c
+++ b/
ls-tree.c
@@
-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 err = 0;
if (e != &root_entry) {
+ int pathlen = strlen(pathbuf);
printf("%06o %s %s ",
e->mode, entry_type(e), entry_hex(e));
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);
}
putchar(line_termination);
}