diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-10-03 03:06:02 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-10-03 03:06:02 -0700 |
commit | 66d4035e1099477aa488c24c0c081ee764f85868 (patch) | |
tree | d89d0c1d61e5af45c19c0903d75aed970ffa2220 /combine-diff.c | |
parent | e66273a6abb8e9cd0967d52113e29c8014a255f8 (diff) | |
parent | 9a76adebd6dfe144c3643e7e877fff2b41be5c8e (diff) | |
download | git-66d4035e1099477aa488c24c0c081ee764f85868.tar.gz |
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 'combine-diff.c')
-rw-r--r-- | combine-diff.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/combine-diff.c b/combine-diff.c index ef622340a5..fe5a2a1953 100644 --- a/combine-diff.c +++ b/combine-diff.c @@ -650,10 +650,7 @@ static void dump_quoted_path(const char *prefix, const char *path, const char *c_meta, const char *c_reset) { printf("%s%s", c_meta, prefix); - if (quote_c_style(path, NULL, NULL, 0)) - quote_c_style(path, NULL, stdout, 0); - else - printf("%s", path); + quote_c_style(path, NULL, stdout, 0); printf("%s\n", c_reset); } @@ -900,16 +897,7 @@ static void show_raw_diff(struct combine_diff_path *p, int num_parent, struct re putchar(inter_name_termination); } - if (line_termination) { - if (quote_c_style(p->path, NULL, NULL, 0)) - quote_c_style(p->path, NULL, stdout, 0); - else - printf("%s", p->path); - putchar(line_termination); - } - else { - printf("%s%c", p->path, line_termination); - } + write_name_quoted(p->path, stdout, line_termination); } void show_combined_diff(struct combine_diff_path *p, |