format-patch: give an overview of what a "patch" message is
The text says something called a "patch" is prepared one for each commit, it is suitable for e-mail submission, and "am" is the command to use it, but does not say what the "patch" really is. The description in the page also refers to the "three-dash" line, but it is unclear what it is, unless the reader is given a more detailed overview of what the "patch" is. Add a brief paragraph to give an overview of what the output looks like. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Mar 24, 2021 at 10:35 UTC
28e29ee38b59c54d199c4ef42a77173e2090ccdb
1 file changed
+19
-2
Documentation/git-format-patch.txt
+19
-2
@@ -36,11 +36,28 @@ SYNOPSIS
36
DESCRIPTION
37
-----------
38
39
-Prepare each commit with its patch in
40
-one file per commit, formatted to resemble UNIX mailbox format.
39
+Prepare each commit with its "patch" in
40
+one "message" per commit, formatted to resemble a UNIX mailbox.
41
The output of this command is convenient for e-mail submission or
42
for use with 'git am'.
43
44
+A "message" generated by the command consists of three parts:
45
+
46
+* A brief metadata header that begins with `From <commit>`
47
+ with a fixed `Mon Sep 17 00:00:00 2001` datestamp to help programs
48
+ like "file(1)" to recognize that the file is an output from this
49
+ command, fields that record the author identity, the author date,
50
+ and the title of the change (taken from the first paragraph of the
51
+ commit log message).
52
+
53
+* The second and subsequent paragraphs of the commit log message.
54
+
55
+* The "patch", which is the "diff -p --stat" output (see
56
+ linkgit:git-diff[1]) between the commit and its parent.
57
+
58
+The log message and the patch is separated by a line with a
59
+three-dash line.
60
+
61
There are two ways to specify which commits to operate on.
62
63
1. A single commit, <since>, specifies that the commits leading