aboutsummaryrefslogtreecommitdiff
path: root/builtin-ls-tree.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-10-03 03:06:02 -0700
committerJunio C Hamano <gitster@pobox.com>2007-10-03 03:06:02 -0700
commit66d4035e1099477aa488c24c0c081ee764f85868 (patch)
treed89d0c1d61e5af45c19c0903d75aed970ffa2220 /builtin-ls-tree.c
parente66273a6abb8e9cd0967d52113e29c8014a255f8 (diff)
parent9a76adebd6dfe144c3643e7e877fff2b41be5c8e (diff)
downloadgit-66d4035e1099477aa488c24c0c081ee764f85868.tar.gz
git-66d4035e1099477aa488c24c0c081ee764f85868.tar.xz
Merge branch 'ph/strbuf'
* ph/strbuf: (44 commits) Make read_patch_file work on a strbuf. strbuf_read_file enhancement, and use it. strbuf change: be sure ->buf is never ever NULL. double free in builtin-update-index.c 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. builtin-for-each-ref.c::copy_name() - do not overstep the buffer. builtin-apply.c: fix a tiny leak introduced during xmemdupz() conversion. Use xmemdupz() in many places. ...
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;
}