Skip to content

Commit 9b0c7f3

Browse files
committed
am: refer to format-patch in the documentation
There were two reasons we didn't do this. As "git am" is designed to grok e-mailed patches, not necessarily taken out of a Git repostiory or even if it came from a Git repository not necessarily produced with format-patch, we didn't want to single it out as the "blessed" input producer to the command. Also, in the original workflow that "git am" was invented for, the user of "am" was expected to be a different person than the users of "format-patch". But this is a very safe change to make in 2023. Thanks to the effort by many contributors, Git ended up becoming a bit more popular than we initially thought it would be, and "format-patch", which took me a few weeks to pursuade Linus to take in 2005, seems to have become the de-facto standard tool to produce patch e-mails. Interestingly, the documentation for "git apply", which is listed in SEE ALSO section of "git am" documentation, does mention "am" and "format-patch" as two things that are related but different from "apply" in an early part. Suggested-by: Kai Grossjohann <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 73876f4 commit 9b0c7f3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Documentation/git-am.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ DESCRIPTION
2424
-----------
2525
Splits mail messages in a mailbox into commit log message,
2626
authorship information and patches, and applies them to the
27-
current branch.
27+
current branch. You could think of it as a reverse operation
28+
of linkgit:git-format-patch[1] run on a branch with a straight
29+
history without merges.
2830

2931
OPTIONS
3032
-------
@@ -273,7 +275,8 @@ include::config/am.txt[]
273275

274276
SEE ALSO
275277
--------
276-
linkgit:git-apply[1].
278+
linkgit:git-apply[1],
279+
linkgit:git-format-patch[1].
277280

278281
GIT
279282
---

0 commit comments

Comments
 (0)