path: root/Documentation/git-format-patch.txt
diff options
authorEric Sunshine <>2018-07-22 09:57:05 (GMT)
committerJunio C Hamano <>2018-07-23 19:50:06 (GMT)
commit126facf8219177bc265be725a8579c86ebdf99a5 (patch)
tree951a68d3b89e0123c1ec0e75de85579a2609dce2 /Documentation/git-format-patch.txt
parentfa5b7ea670f4c5ee377e7fce799300829eabb291 (diff)
format-patch: add --interdiff option to embed diff in cover letter
When submitting a revised version of a patch series, it can be helpful (to reviewers) to include a summary of changes since the previous attempt in the form of an interdiff, however, doing so involves manually copy/pasting the diff into the cover letter. Add an --interdiff option to automate this process. The argument to --interdiff specifies the tip of the previous attempt against which to generate the interdiff. For example: git format-patch --cover-letter --interdiff=v1 -3 v2 The previous attempt and the patch series being formatted must share a common base. Signed-off-by: Eric Sunshine <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation/git-format-patch.txt')
1 files changed, 9 insertions, 0 deletions
diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt
index b41e132..a1b1baf 100644
--- a/Documentation/git-format-patch.txt
+++ b/Documentation/git-format-patch.txt
@@ -23,6 +23,7 @@ SYNOPSIS
[(--reroll-count|-v) <n>]
[--to=<email>] [--cc=<email>]
[--[no-]cover-letter] [--quiet] [--notes[=<ref>]]
+ [--interdiff=<previous>]
[<common diff options>]
[ <since> | <revision range> ]
@@ -228,6 +229,14 @@ feeding the result to `git send-email`.
containing the branch description, shortlog and the overall diffstat. You can
fill in a description in the file before sending it out.
+ As a reviewer aid, insert an interdiff into the cover letter showing
+ the differences between the previous version of the patch series and
+ the series currently being formatted. `previous` is a single revision
+ naming the tip of the previous series which shares a common base with
+ the series being formatted (for example `git format-patch
+ --cover-letter --interdiff=feature/v1 -3 feature/v2`).
Append the notes (see linkgit:git-notes[1]) for the commit
after the three-dash line.