diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-07-25 13:59:20 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-07-25 13:59:21 -0700 |
commit | 43ba21cb574ee3f9a1acf4580868982f4c883ac6 (patch) | |
tree | 1c77f20d9d9b2ab52626d3465f057e964bb8b463 /diff.c | |
parent | Merge branch 'ab/test-env' (diff) | |
parent | range-diff: add headers to the outer hunk header (diff) | |
download | tgif-43ba21cb574ee3f9a1acf4580868982f4c883ac6.tar.xz |
Merge branch 'tg/range-diff-output-update'
"git range-diff" output has been tweaked for easier identification
of which part of what file the patch shown is about.
* tg/range-diff-output-update:
range-diff: add headers to the outer hunk header
range-diff: add filename to inner diff
range-diff: add section header instead of diff header
range-diff: suppress line count in outer diff
range-diff: don't remove funcname from inner diff
range-diff: split lines manually
range-diff: fix function parameter indentation
apply: make parse_git_diff_header public
apply: only pass required data to gitdiff_* functions
apply: only pass required data to find_name_*
apply: only pass required data to check_header_line
apply: only pass required data to git_header_name
apply: only pass required data to skip_tree_prefix
apply: replace marc.info link with public-inbox
Diffstat (limited to 'diff.c')
-rw-r--r-- | diff.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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); /* |