aboutsummaryrefslogtreecommitdiff
path: root/builtin-ls-tree.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-09-27 00:52:47 -0700
committerJunio C Hamano <gitster@pobox.com>2007-09-27 00:52:47 -0700
commita17ba31b0b75365e1245e494d46abae4afc57480 (patch)
tree41c1d800c92e60d97a8b984dce086bcb3473dcc2 /builtin-ls-tree.c
parent0f729f21348c43a1c80f48faed2e753b1c923e85 (diff)
parent6d69b6f6ac27ab6f71a10da34b813ca25fd2a358 (diff)
downloadgit-a17ba31b0b75365e1245e494d46abae4afc57480.tar.gz
git-a17ba31b0b75365e1245e494d46abae4afc57480.tar.xz
Merge branch 'ph/strbuf' into kh/commit
* ph/strbuf: Clean up stripspace a bit, use strbuf even more. Add strbuf_read_file(). rerere: Fix use of an empty strbuf.buf Small cache_tree_write refactor. Make builtin-rerere use of strbuf nicer and more efficient. Add strbuf_cmp. strbuf_setlen(): do not barf on setting length of an empty buffer to 0 sq_quote_argv and add_to_string rework with strbuf's. Full rework of quote_c_style and write_name_quoted. Rework unquote_c_style to work on a strbuf. strbuf API additions and enhancements. nfv?asprintf are broken without va_copy, workaround them. Fix the expansion pattern of the pseudo-static path buffer.
Diffstat (limited to 'builtin-ls-tree.c')
-rw-r--r--builtin-ls-tree.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/builtin-ls-tree.c b/builtin-ls-tree.c
index cb4be4fab..7abe333ce 100644
--- a/builtin-ls-tree.c
+++ b/builtin-ls-tree.c
@@ -112,10 +112,8 @@ static int show_tree(const unsigned char *sha1, const char *base, int baselen,
abbrev ? find_unique_abbrev(sha1, abbrev)
: sha1_to_hex(sha1));
}
- write_name_quoted(base + chomp_prefix, baselen - chomp_prefix,
- pathname,
- line_termination, stdout);
- putchar(line_termination);
+ write_name_quotedpfx(base + chomp_prefix, baselen - chomp_prefix,
+ pathname, stdout, line_termination);
return retval;
}