Skip to content

Commit 07583a2

Browse files
jnavilagitster
authored andcommitted
doc: convert git-log to new documentation format
- Switch the synopsis to a synopsis block which will automatically format placeholders in italics and keywords in monospace - Use _<placeholder>_ instead of <placeholder> in the description - Use `backticks` for keywords and more complex option descriptions. The new rendering engine will apply synopsis rules to these spans. Signed-off-by: Jean-Noël Avila <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8db3019 commit 07583a2

File tree

1 file changed

+44
-39
lines changed

1 file changed

+44
-39
lines changed

Documentation/git-log.adoc

Lines changed: 44 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ git-log - Show commit logs
88

99
SYNOPSIS
1010
--------
11-
[verse]
12-
'git log' [<options>] [<revision-range>] [[--] <path>...]
11+
[synopsis]
12+
git log [<options>] [<revision-range>] [[--] <path>...]
1313

1414
DESCRIPTION
1515
-----------
@@ -27,27 +27,32 @@ each commit introduces are shown.
2727
OPTIONS
2828
-------
2929

30-
--follow::
30+
`--follow`::
3131
Continue listing the history of a file beyond renames
3232
(works only for a single file).
3333

34-
--no-decorate::
35-
--decorate[=short|full|auto|no]::
36-
Print out the ref names of any commits that are shown. If 'short' is
37-
specified, the ref name prefixes 'refs/heads/', 'refs/tags/' and
38-
'refs/remotes/' will not be printed. If 'full' is specified, the
39-
full ref name (including prefix) will be printed. If 'auto' is
40-
specified, then if the output is going to a terminal, the ref names
41-
are shown as if 'short' were given, otherwise no ref names are
42-
shown. The option `--decorate` is short-hand for `--decorate=short`.
43-
Default to configuration value of `log.decorate` if configured,
44-
otherwise, `auto`.
45-
46-
--decorate-refs=<pattern>::
47-
--decorate-refs-exclude=<pattern>::
34+
`--no-decorate`::
35+
`--decorate[=(short|full|auto|no)]`::
36+
Print out the ref names of any commits that are shown. Possible values
37+
are:
38+
+
39+
----
40+
`short`;; the ref name prefixes `refs/heads/`, `refs/tags/` and
41+
`refs/remotes/` are not printed.
42+
`full`;; the full ref name (including prefix) is printed.
43+
`auto`:: if the output is going to a terminal, the ref names
44+
are shown as if `short` were given, otherwise no ref names are
45+
shown.
46+
----
47+
+
48+
The option `--decorate` is short-hand for `--decorate=short`. Default to
49+
configuration value of `log.decorate` if configured, otherwise, `auto`.
50+
51+
`--decorate-refs=<pattern>`::
52+
`--decorate-refs-exclude=<pattern>`::
4853
For each candidate reference, do not use it for decoration if it
49-
matches any patterns given to `--decorate-refs-exclude` or if it
50-
doesn't match any of the patterns given to `--decorate-refs`. The
54+
matches any of _<pattern>_ given to `--decorate-refs-exclude` or if it
55+
doesn't match any of _<pattern>_ given to `--decorate-refs`. The
5156
`log.excludeDecoration` config option allows excluding refs from
5257
the decorations, but an explicit `--decorate-refs` pattern will
5358
override a match in `log.excludeDecoration`.
@@ -56,51 +61,51 @@ If none of these options or config settings are given, then references are
5661
used as decoration if they match `HEAD`, `refs/heads/`, `refs/remotes/`,
5762
`refs/stash/`, or `refs/tags/`.
5863

59-
--clear-decorations::
64+
`--clear-decorations`::
6065
When specified, this option clears all previous `--decorate-refs`
6166
or `--decorate-refs-exclude` options and relaxes the default
6267
decoration filter to include all references. This option is
6368
assumed if the config value `log.initialDecorationSet` is set to
6469
`all`.
6570

66-
--source::
71+
`--source`::
6772
Print out the ref name given on the command line by which each
6873
commit was reached.
6974

70-
--[no-]mailmap::
71-
--[no-]use-mailmap::
75+
`--[no-]mailmap`::
76+
`--[no-]use-mailmap`::
7277
Use mailmap file to map author and committer names and email
7378
addresses to canonical real names and email addresses. See
7479
linkgit:git-shortlog[1].
7580

76-
--full-diff::
81+
`--full-diff`::
7782
Without this flag, `git log -p <path>...` shows commits that
7883
touch the specified paths, and diffs about the same specified
7984
paths. With this, the full diff is shown for commits that touch
80-
the specified paths; this means that "<path>..." limits only
85+
the specified paths; this means that "`<path>...`" limits only
8186
commits, and doesn't limit diff for those commits.
8287
+
8388
Note that this affects all diff-based output types, e.g. those
8489
produced by `--stat`, etc.
8590

86-
--log-size::
87-
Include a line ``log size <number>'' in the output for each commit,
88-
where <number> is the length of that commit's message in bytes.
91+
`--log-size`::
92+
Include a line `log size <number>` in the output for each commit,
93+
where _<number>_ is the length of that commit's message in bytes.
8994
Intended to speed up tools that read log messages from `git log`
9095
output by allowing them to allocate space in advance.
9196

9297
include::line-range-options.adoc[]
9398

94-
<revision-range>::
99+
_<revision-range>_::
95100
Show only commits in the specified revision range. When no
96-
<revision-range> is specified, it defaults to `HEAD` (i.e. the
101+
_<revision-range>_ is specified, it defaults to `HEAD` (i.e. the
97102
whole history leading to the current commit). `origin..HEAD`
98103
specifies all the commits reachable from the current commit
99104
(i.e. `HEAD`), but not from `origin`. For a complete list of
100-
ways to spell <revision-range>, see the 'Specifying Ranges'
105+
ways to spell _<revision-range>_, see the 'Specifying Ranges'
101106
section of linkgit:gitrevisions[7].
102107

103-
[--] <path>...::
108+
`[--] <path>...`::
104109
Show only commits that are enough to explain how the files
105110
that match the specified paths came to be. See 'History
106111
Simplification' below for details and other simplification
@@ -145,14 +150,14 @@ EXAMPLES
145150

146151
`git log --since="2 weeks ago" -- gitk`::
147152

148-
Show the changes during the last two weeks to the file 'gitk'.
153+
Show the changes during the last two weeks to the file `gitk`.
149154
The `--` is necessary to avoid confusion with the *branch* named
150-
'gitk'
155+
`gitk`
151156

152157
`git log --name-status release..test`::
153158

154-
Show the commits that are in the "test" branch but not yet
155-
in the "release" branch, along with the list of paths
159+
Show the commits that are in the "`test`" branch but not yet
160+
in the "`release`" branch, along with the list of paths
156161
each commit modifies.
157162

158163
`git log --follow builtin/rev-list.c`::
@@ -164,7 +169,7 @@ EXAMPLES
164169
`git log --branches --not --remotes=origin`::
165170

166171
Shows all commits that are in any of local branches but not in
167-
any of remote-tracking branches for 'origin' (what you have that
172+
any of remote-tracking branches for `origin` (what you have that
168173
origin doesn't).
169174

170175
`git log master --not --remotes=*/master`::
@@ -200,11 +205,11 @@ CONFIGURATION
200205
See linkgit:git-config[1] for core variables and linkgit:git-diff[1]
201206
for settings related to diff generation.
202207

203-
format.pretty::
208+
`format.pretty`::
204209
Default for the `--format` option. (See 'Pretty Formats' above.)
205210
Defaults to `medium`.
206211

207-
i18n.logOutputEncoding::
212+
`i18n.logOutputEncoding`::
208213
Encoding to use when displaying logs. (See 'Discussion' above.)
209214
Defaults to the value of `i18n.commitEncoding` if set, and UTF-8
210215
otherwise.

0 commit comments

Comments
 (0)