summaryrefslogtreecommitdiff
path: root/ls-files.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-11-29 06:55:25 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-11-29 06:55:25 (GMT)
commit9ef2b3cbf62d15aa0312bde349347873d7c0f399 (patch)
tree80083c23c526bb58f12fd3895887cf57a8db3a16 /ls-files.c
parentffb1a4bed55534e276a0e4fc7dc1c94d17be8579 (diff)
downloadgit-9ef2b3cbf62d15aa0312bde349347873d7c0f399.zip
git-9ef2b3cbf62d15aa0312bde349347873d7c0f399.tar.gz
git-9ef2b3cbf62d15aa0312bde349347873d7c0f399.tar.bz2
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-files.c')
-rw-r--r--ls-files.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ls-files.c b/ls-files.c
index db2288a..f3f1a6a 100644
--- a/ls-files.c
+++ b/ls-files.c
@@ -344,7 +344,7 @@ static void show_dir_entry(const char *tag, struct nond_on_fs *ent)
return;
fputs(tag, stdout);
- write_name_quoted("", ent->name + offset, line_terminator, stdout);
+ write_name_quoted("", 0, ent->name + offset, line_terminator, stdout);
putchar(line_terminator);
}
@@ -433,7 +433,8 @@ static void show_ce_entry(const char *tag, struct cache_entry *ce)
if (!show_stage) {
fputs(tag, stdout);
- write_name_quoted("", ce->name + offset, line_terminator, stdout);
+ write_name_quoted("", 0, ce->name + offset,
+ line_terminator, stdout);
putchar(line_terminator);
}
else {
@@ -442,7 +443,8 @@ static void show_ce_entry(const char *tag, struct cache_entry *ce)
ntohl(ce->ce_mode),
sha1_to_hex(ce->sha1),
ce_stage(ce));
- write_name_quoted("", ce->name + offset, line_terminator, stdout);
+ write_name_quoted("", 0, ce->name + offset,
+ line_terminator, stdout);
putchar(line_terminator);
}
}