list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
* [PATCH v2] docs/format-patch: mention handling of merges
@ 2021-05-01 14:13 Jeff King
  0 siblings, 0 replies; only message in thread
From: Jeff King @ 2021-05-01 14:13 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Wang Yugui

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 <>
This is a re-work of the patch from:

taking into account Junio's suggestion (and also rebased on top of
28e29ee38b, which touches the same intro paragraph).

 Documentation/git-format-patch.txt | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt
index 911da181a1..fe2f69d36e 100644
--- a/Documentation/git-format-patch.txt
+++ b/Documentation/git-format-patch.txt
@@ -36,7 +36,7 @@ SYNOPSIS
-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'.
@@ -740,6 +740,14 @@ use it only when you know the recipient uses Git to apply your patch.
 $ git format-patch -3
+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.
 linkgit:git-am[1], linkgit:git-send-email[1]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-01 14:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-01 14:13 [PATCH v2] docs/format-patch: mention handling of merges Jeff King list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ \
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
 note: .onion URLs require Tor:

code repositories for project(s) associated with this inbox:

AGPL code for this site: git clone