Skip to content

RFC format-patch: automate cover letter range-diff

Eric Sunshine git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 23 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5format-patch: allow additional generated content in make_cover_letter()builtin/log.c+23 -202 replies
2/5format-patch: add --range-diff option to embed diff in cover letterDocumentation/git-format-patch.txt builtin/log.c t/t7910-branch-diff.sh+77 -35 replies
3/5format-patch: extend --range-diff to accept revision rangeDocumentation/git-format-patch.txt builtin/log.c t/t7910-branch-diff.sh+19 -64 replies
4/5format-patch: teach --range-diff to respect -v/--reroll-countbuiltin/log.c+5 -14 replies
5/5format-patch: add --creation-weight tweak for --range-diffDocumentation/git-format-patch.txt builtin/log.c+22 -51 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/5] format-patch: automate cover letter range-diff

Dscho recently implemented a 'tbdiff' replacement as a Git builtin named git-branch-diff[1] which computes differences between two versions of a patch series. Such a diff can be a useful aid for reviewers when inserted into a cover letter. However, doing so requires manual generation (invoking git-branch-diff) and copy/pasting the result into the cover letter.

This series fully automates the process by adding a --range-diff option to git-format-patch. It is RFC for a couple reasons:

* The final name for the 'tbdiff' replacement has not yet been nailed down. The name git-branch-diff is moribund[2]; Dscho favors merging the functionality into git-branch as a new --diff option[3]; others prefer a standalone command named git-range-diff or git-series-diff[4] or similar.

* I have some ideas for future enhancements and want to be careful not to lock in a UI which doesn't mesh well with them (though I think the current UI turned out reasonably well). First, I foresee a complementary --interdiff option for inserting an interdiff-style diff for cases when that style is easier to read or simply more appropriate. Second, although the current patch series only supports --range-diff for the cover letter, some people insert interdiff- or tbdiff-style diffs (indented) into the commentary section of standalone patches. Although this often makes for a noisy mess, it is periodically useful.

This series is built atop js/branch-diff in 'pu'.

[1]: https://public-inbox.org/git/[email protected]/
[2]: https://public-inbox.org/git/[email protected]/
[3]: https://public-inbox.org/git/[email protected]/
[4]: https://public-inbox.org/git/[email protected]/

Eric Sunshine (5):
format-patch: allow additional generated content in
make_cover_letter()
format-patch: add --range-diff option to embed diff in cover letter
format-patch: extend --range-diff to accept revision range
format-patch: teach --range-diff to respect -v/--reroll-count
format-patch: add --creation-weight tweak for --range-diff

 Documentation/git-format-patch.txt |  18 +++++
 builtin/log.c                      | 119 ++++++++++++++++++++++++-----
 t/t7910-branch-diff.sh             |  16 ++++
 3 files changed, 132 insertions(+), 21 deletions(-)
Signature · 1 line
2.17.1.1235.ge295dfb56e