Skip to content

Commit 5c2f7ff

Browse files
committed
Merge branch 'jc/doc-format-patch-clarify'
Explain pieces of the format-patch output upfront before the rest of the documentation starts referring to them. * jc/doc-format-patch-clarify: format-patch: give an overview of what a "patch" message is
2 parents 7652ce9 + 28e29ee commit 5c2f7ff

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

Documentation/git-format-patch.txt

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,28 @@ SYNOPSIS
3636
DESCRIPTION
3737
-----------
3838

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.
4141
The output of this command is convenient for e-mail submission or
4242
for use with 'git am'.
4343

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+
4461
There are two ways to specify which commits to operate on.
4562

4663
1. A single commit, <since>, specifies that the commits leading

0 commit comments

Comments
 (0)