X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=diff.c;h=efe42b341ae15ebceb1e216518ab3a542be361dc;hb=7c20df84bd21ec0215358381844274fa10515017;hp=1ee04e321b1b5cc4e3f6bde37f49b7d3c0694aa6;hpb=b9546926b6ede7cc74b3c4720c18d77600c9e54f;p=thirdparty%2Fgit.git diff --git a/diff.c b/diff.c index 1ee04e321b..efe42b341a 100644 --- a/diff.c +++ b/diff.c @@ -1673,7 +1673,10 @@ static void emit_hunk_header(struct emit_callback *ecbdata, if (ecbdata->opt->flags.dual_color_diffed_diffs) strbuf_addstr(&msgbuf, reverse); strbuf_addstr(&msgbuf, frag); - strbuf_add(&msgbuf, line, ep - line); + if (ecbdata->opt->flags.suppress_hunk_header_line_count) + strbuf_add(&msgbuf, atat, sizeof(atat)); + else + strbuf_add(&msgbuf, line, ep - line); strbuf_addstr(&msgbuf, reset); /* @@ -4206,6 +4209,8 @@ static void run_external_diff(const char *pgm, argv_array_pushf(&env, "GIT_DIFF_PATH_COUNTER=%d", ++o->diff_path_counter); argv_array_pushf(&env, "GIT_DIFF_PATH_TOTAL=%d", q->nr); + diff_free_filespec_data(one); + diff_free_filespec_data(two); if (run_command_v_opt_cd_env(argv.argv, RUN_USING_SHELL, NULL, env.argv)) die(_("external diff died, stopping at %s"), name);