Skip to content

Commit

Permalink
Merge branch 'jw/doc-commit-title'
Browse files Browse the repository at this point in the history
Update parts of document that talked about "first line of commit
log" to say "title of commit" with definition of what that "title"
is.

* jw/doc-commit-title:
  Documentation: describe subject more precisely
  • Loading branch information
gitster committed Sep 17, 2012
2 parents 3b0b6b5 + 52ffe99 commit d6e32f6
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 22 deletions.
6 changes: 4 additions & 2 deletions Documentation/git-commit.txt
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,10 @@ DISCUSSION
Though not required, it's a good idea to begin the commit message
with a single short (less than 50 character) line summarizing the
change, followed by a blank line and then a more thorough description.
Tools that turn commits into email, for example, use the first line
on the Subject: line and the rest of the commit in the body.
The text up to the first blank line in a commit message is treated
as the commit title, and that title is used throughout git.
For example, linkgit:git-format-patch[1] turns a commit into email, and it uses
the title on the Subject line and the rest of the commit in the body.

include::i18n.txt[]

Expand Down
7 changes: 4 additions & 3 deletions Documentation/git-for-each-ref.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,10 @@ Fields that have name-email-date tuple as its value (`author`,
and `date` to extract the named component.

The complete message in a commit and tag object is `contents`.
Its first line is `contents:subject`, the remaining lines
are `contents:body` and the optional GPG signature
is `contents:signature`.
Its first line is `contents:subject`, where subject is the concatenation
of all lines of the commit message up to the first blank line. The next
line is 'contents:body', where body is all of the lines after the first
blank line. Finally, the optional GPG signature is `contents:signature`.

For sorting purposes, fields with numeric values sort in numeric
order (`objectsize`, `authordate`, `committerdate`, `taggerdate`).
Expand Down
11 changes: 7 additions & 4 deletions Documentation/git-format-patch.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,13 @@ output, unless the `--stdout` option is specified.
If `-o` is specified, output files are created in <dir>. Otherwise
they are created in the current working directory.

By default, the subject of a single patch is "[PATCH] First Line" and
the subject when multiple patches are output is "[PATCH n/m] First
Line". To force 1/1 to be added for a single patch, use `-n`. To omit
patch numbers from the subject, use `-N`.
By default, the subject of a single patch is "[PATCH] " followed by
the concatenation of lines from the commit message up to the first blank
line (see the DISCUSSION section of linkgit:git-commit[1]).

When multiple patches are output, the subject prefix will instead be
"[PATCH n/m] ". To force 1/1 to be added for a single patch, use `-n`.
To omit patch numbers from the subject, use `-N`.

If given `--thread`, `git-format-patch` will generate `In-Reply-To` and
`References` headers to make the second and subsequent patch mails appear
Expand Down
3 changes: 1 addition & 2 deletions Documentation/git-shortlog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ git log --pretty=short | 'git shortlog' [-h] [-n] [-s] [-e] [-w]
DESCRIPTION
-----------
Summarizes 'git log' output in a format suitable for inclusion
in release announcements. Each commit will be grouped by author and
the first line of the commit message will be shown.
in release announcements. Each commit will be grouped by author and title.

Additionally, "[PATCH]" will be stripped from the commit description.

Expand Down
9 changes: 4 additions & 5 deletions Documentation/gitcore-tutorial.txt
Original file line number Diff line number Diff line change
Expand Up @@ -956,12 +956,11 @@ $ git show-branch --topo-order --more=1 master mybranch
------------------------------------------------

The first two lines indicate that it is showing the two branches
and the first line of the commit log message from their
top-of-the-tree commits, you are currently on `master` branch
(notice the asterisk `*` character), and the first column for
the later output lines is used to show commits contained in the
with the titles of their top-of-the-tree commits, you are currently on
`master` branch (notice the asterisk `*` character), and the first
column for the later output lines is used to show commits contained in the
`master` branch, and the second column for the `mybranch`
branch. Three commits are shown along with their log messages.
branch. Three commits are shown along with their titles.
All of them have non blank characters in the first column (`*`
shows an ordinary commit on the current branch, `-` is a merge commit), which
means they are now part of the `master` branch. Only the "Some
Expand Down
8 changes: 5 additions & 3 deletions Documentation/gittutorial.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,11 @@ them to the index, and commit, all in one step.
A note on commit messages: Though not required, it's a good idea to
begin the commit message with a single short (less than 50 character)
line summarizing the change, followed by a blank line and then a more
thorough description. Tools that turn commits into email, for
example, use the first line on the Subject: line and the rest of the
commit in the body.
thorough description. The text up to the first blank line in a commit
message is treated as the commit title, and that title is used
throughout git. For example, linkgit:git-format-patch[1] turns a
commit into email, and it uses the title on the Subject line and the
rest of the commit in the body.

Git tracks content not files
----------------------------
Expand Down
9 changes: 6 additions & 3 deletions Documentation/user-manual.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1136,9 +1136,12 @@ Creating good commit messages
Though not required, it's a good idea to begin the commit message
with a single short (less than 50 character) line summarizing the
change, followed by a blank line and then a more thorough
description. Tools that turn commits into email, for example, use
the first line on the Subject line and the rest of the commit in the
body.
description. The text up to the first blank line in a commit
message is treated as the commit title, and that title is used
throughout git. For example, linkgit:git-format-patch[1] turns a
commit into email, and it uses the title on the Subject line and the
rest of the commit in the body.


[[ignoring-files]]
Ignoring files
Expand Down

0 comments on commit d6e32f6

Please sign in to comment.