{"thread":{"id":"55602","subject":"[PATCH v2] docs/format-patch: mention handling of merges","startedAt":"2021-05-01T14:13:30Z","lastAt":"2021-05-01T14:13:30Z","messageCount":1,"participants":["Jeff King"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"423405","messageId":"YI1iBGGW6ySxNDRH@coredump.intra.peff.net","threadId":"55602","inReplyTo":null,"subject":"[PATCH v2] docs/format-patch: mention handling of merges","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2021-05-01T14:13:24Z","receivedAt":"2021-05-01T14:13:30Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"Format-patch doesn't have a way to format merges in a way that can be\napplied by git-am (or any other tool), and so it just omits them.\nHowever, this may be a surprising implication for users who are not well\nversed in how the tool works. Let's add a note to the documentation\nmaking this more clear.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\nThis is a re-work of the patch from:\n\n  https://lore.kernel.org/git/YDQ5YIeXGiR5nvLH@coredump.intra.peff.net/\n\ntaking into account Junio's suggestion (and also rebased on top of\n28e29ee38b, which touches the same intro paragraph).\n\n Documentation/git-format-patch.txt | 10 +++++++++-\n 1 file changed, 9 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt\nindex 911da181a1..fe2f69d36e 100644\n--- a/Documentation/git-format-patch.txt\n+++ b/Documentation/git-format-patch.txt\n@@ -36,7 +36,7 @@ SYNOPSIS\n DESCRIPTION\n -----------\n \n-Prepare each commit with its \"patch\" in\n+Prepare each non-merge commit with its \"patch\" in\n one \"message\" per commit, formatted to resemble a UNIX mailbox.\n The output of this command is convenient for e-mail submission or\n for use with 'git am'.\n@@ -740,6 +740,14 @@ use it only when you know the recipient uses Git to apply your patch.\n $ git format-patch -3\n ------------\n \n+CAVEATS\n+-------\n+\n+Note that `format-patch` will omit merge commits from the output, even\n+if they are part of the requested range. A simple \"patch\" does not\n+include enough information for the receiving end to reproduce the same\n+merge commit.\n+\n SEE ALSO\n --------\n linkgit:git-am[1], linkgit:git-send-email[1]\n-- \n2.31.1.875.g5dccece0aa\n"}]}