diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-09-27 00:52:47 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-09-27 00:52:47 -0700 |
commit | a17ba31b0b75365e1245e494d46abae4afc57480 (patch) | |
tree | 41c1d800c92e60d97a8b984dce086bcb3473dcc2 /combine-diff.c | |
parent | 0f729f21348c43a1c80f48faed2e753b1c923e85 (diff) | |
parent | 6d69b6f6ac27ab6f71a10da34b813ca25fd2a358 (diff) | |
download | git-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 '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 ef622340a..fe5a2a195 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, |