X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=combine-diff.c;h=fe5a2a1953a06204ad6f1c045bd06dd984d3acc6;hb=4340a813d007b592534de664d152d66417dbe809;hp=ea3ca5f950561a92fdd3be1a4ee4bbd726656118;hpb=f95c6780c244e90abf87222126ad3b4bb18a504e;p=git.git diff --git a/combine-diff.c b/combine-diff.c index ea3ca5f95..fe5a2a195 100644 --- a/combine-diff.c +++ b/combine-diff.c @@ -215,8 +215,7 @@ static void combine_diff(const unsigned char *parent, mmfile_t *result_file, parent_file.ptr = grab_blob(parent, &sz); parent_file.size = sz; xpp.flags = XDF_NEED_MINIMAL; - xecfg.ctxlen = 0; - xecfg.flags = 0; + memset(&xecfg, 0, sizeof(xecfg)); ecb.outf = xdiff_outf; ecb.priv = &state; memset(&state, 0, sizeof(state)); @@ -651,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); } @@ -901,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,