Git 2.32 (Q2 2021) actually explains pieces of the format-patch output upfront before the rest of the documentation starts referring to them.
See commit 28e29ee (24 Mar 2021) by Junio C Hamano (gitster
).
(Merged by Junio C Hamano -- gitster
-- in commit 5c2f7ff, 30 Mar 2021)
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.
git format-patch
now includes in its man page:
Prepare each commit with its "patch" in
one "message" per commit, formatted to resemble a UNIX mailbox.
A "message" generated by the command consists of three parts:
A brief metadata header that begins with From <commit>
with a fixed Mon Sep 17 00:00:00 2001
datestamp to help programs
like "file(1)" to recognize that the file is an output from this
command, fields that record the author identity, the author date,
and the title of the change (taken from the first paragraph of the
commit log message).
The second and subsequent paragraphs of the commit log message.
The "patch", which is the "diff -p --stat
" output (see
git diff
) between the commit and its parent.
The log message and the patch is separated by a line with a
three-dash line.