Skip to content

Commit 8e0601f

Browse files
peffgitster
authored andcommitted
docs/format-patch: mention handling of merges
Format-patch doesn't have a way to format merges in a way that can be applied by git-am (or any other tool), and so it just omits them. However, this may be a surprising implication for users who are not well versed in how the tool works. Let's add a note to the documentation making this more clear. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 28e29ee commit 8e0601f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Documentation/git-format-patch.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ SYNOPSIS
3636
DESCRIPTION
3737
-----------
3838

39-
Prepare each commit with its "patch" in
39+
Prepare each non-merge commit with its "patch" in
4040
one "message" per commit, formatted to resemble a UNIX mailbox.
4141
The output of this command is convenient for e-mail submission or
4242
for use with 'git am'.
@@ -735,6 +735,14 @@ use it only when you know the recipient uses Git to apply your patch.
735735
$ git format-patch -3
736736
------------
737737

738+
CAVEATS
739+
-------
740+
741+
Note that `format-patch` will omit merge commits from the output, even
742+
if they are part of the requested range. A simple "patch" does not
743+
include enough information for the receiving end to reproduce the same
744+
merge commit.
745+
738746
SEE ALSO
739747
--------
740748
linkgit:git-am[1], linkgit:git-send-email[1]

0 commit comments

Comments
 (0)