Hi Eric, On Wed, 30 May 2018, Eric Sunshine wrote: > 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. Nice! > 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 think this has been settled now: range-diff it is. > * 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. Sure. > This series is built atop js/branch-diff in 'pu'. > > [1]: https://public-inbox.org/git/cover.1525448066.git.johannes.schindelin@xxxxxx/ > [2]: https://public-inbox.org/git/nycvar.QRO.7.76.6.1805061401260.77@xxxxxxxxxxxxxxxxx/ > [3]: https://public-inbox.org/git/nycvar.QRO.7.76.6.1805062155120.77@xxxxxxxxxxxxxxxxx/ > [4]: https://public-inbox.org/git/xmqqin7gzbkb.fsf@xxxxxxxxxxxxxxxxxxxxxxxxx/ > > 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(-) > > -- > 2.17.1.1235.ge295dfb56e Thanks! Dscho