diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-03-31 00:35:38 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-03-31 00:35:38 +0300 |
commit | 5c2f7ff0181cdcf711323e98b016bdd165484406 (patch) | |
tree | 15bb45596b6ea562628143582819cf12e135c295 | |
parent | 7652ce966f9b398e02a5df0344d015c4d54ca52a (diff) | |
parent | 28e29ee38b59c54d199c4ef42a77173e2090ccdb (diff) |
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
-rw-r--r-- | Documentation/git-format-patch.txt | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt index 3e49bf2210..5cd8578b6f 100644 --- a/Documentation/git-format-patch.txt +++ b/Documentation/git-format-patch.txt @@ -36,11 +36,28 @@ SYNOPSIS DESCRIPTION ----------- -Prepare each commit with its patch in -one file per commit, formatted to resemble UNIX mailbox format. +Prepare each 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'. +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 + linkgit:git-diff[1]) between the commit and its parent. + +The log message and the patch is separated by a line with a +three-dash line. + There are two ways to specify which commits to operate on. 1. A single commit, <since>, specifies that the commits leading |