]> git.ipfire.org Git - thirdparty/git.git/commitdiff
docs/format-patch: mention handling of merges
authorJeff King <peff@peff.net>
Sat, 1 May 2021 14:13:24 +0000 (10:13 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 3 May 2021 05:32:39 +0000 (14:32 +0900)
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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-format-patch.txt

index 5cd8578b6f387b5a9e75d57a3b61006d28b4e686..49dad1f5b9bf0b6244704c1324c15ae9ca55ccfd 100644 (file)
@@ -36,7 +36,7 @@ SYNOPSIS
 DESCRIPTION
 -----------
 
-Prepare each commit with its "patch" in
+Prepare each non-merge commit with its "patch" in
 one "message" per commit, formatted to resemble a UNIX mailbox.
 The output of this command is convenient for e-mail submission or
 for use with 'git am'.
@@ -735,6 +735,14 @@ use it only when you know the recipient uses Git to apply your patch.
 $ git format-patch -3
 ------------
 
+CAVEATS
+-------
+
+Note that `format-patch` will omit merge commits from the output, even
+if they are part of the requested range. A simple "patch" does not
+include enough information for the receiving end to reproduce the same
+merge commit.
+
 SEE ALSO
 --------
 linkgit:git-am[1], linkgit:git-send-email[1]