Git fork

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.

We also transform inline descriptions of possible values of option
--decorate into a list, which is more readable and extensible.

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Jean-Noël Avila and committed by
Junio C Hamano
026f2e3b 16bd9f20

+45 -39
+45 -39
Documentation/git-log.adoc
··· 8 8 9 9 SYNOPSIS 10 10 -------- 11 - [verse] 12 - 'git log' [<options>] [<revision-range>] [[--] <path>...] 11 + [synopsis] 12 + git log [<options>] [<revision-range>] [[--] <path>...] 13 13 14 14 DESCRIPTION 15 15 ----------- ··· 27 27 OPTIONS 28 28 ------- 29 29 30 - --follow:: 30 + `--follow`:: 31 31 Continue listing the history of a file beyond renames 32 32 (works only for a single file). 33 33 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`. 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`. 45 50 46 - --decorate-refs=<pattern>:: 47 - --decorate-refs-exclude=<pattern>:: 51 + `--decorate-refs=<pattern>`:: 52 + `--decorate-refs-exclude=<pattern>`:: 48 53 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 51 - `log.excludeDecoration` config option allows excluding refs from 54 + matches any of the _<pattern>_ parameters given to 55 + `--decorate-refs-exclude` or if it doesn't match any of the 56 + _<pattern>_ parameters given to `--decorate-refs`. 57 + The `log.excludeDecoration` config option allows excluding refs from 52 58 the decorations, but an explicit `--decorate-refs` pattern will 53 59 override a match in `log.excludeDecoration`. 54 60 + ··· 56 62 used as decoration if they match `HEAD`, `refs/heads/`, `refs/remotes/`, 57 63 `refs/stash/`, or `refs/tags/`. 58 64 59 - --clear-decorations:: 65 + `--clear-decorations`:: 60 66 When specified, this option clears all previous `--decorate-refs` 61 67 or `--decorate-refs-exclude` options and relaxes the default 62 68 decoration filter to include all references. This option is 63 69 assumed if the config value `log.initialDecorationSet` is set to 64 70 `all`. 65 71 66 - --source:: 72 + `--source`:: 67 73 Print out the ref name given on the command line by which each 68 74 commit was reached. 69 75 70 - --[no-]mailmap:: 71 - --[no-]use-mailmap:: 76 + `--[no-]mailmap`:: 77 + `--[no-]use-mailmap`:: 72 78 Use mailmap file to map author and committer names and email 73 79 addresses to canonical real names and email addresses. See 74 80 linkgit:git-shortlog[1]. 75 81 76 - --full-diff:: 82 + `--full-diff`:: 77 83 Without this flag, `git log -p <path>...` shows commits that 78 84 touch the specified paths, and diffs about the same specified 79 85 paths. With this, the full diff is shown for commits that touch 80 - the specified paths; this means that "<path>..." limits only 86 + the specified paths; this means that "`<path>...`" limits only 81 87 commits, and doesn't limit diff for those commits. 82 88 + 83 89 Note that this affects all diff-based output types, e.g. those 84 90 produced by `--stat`, etc. 85 91 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. 92 + `--log-size`:: 93 + Include a line `log size <number>` in the output for each commit, 94 + where _<number>_ is the length of that commit's message in bytes. 89 95 Intended to speed up tools that read log messages from `git log` 90 96 output by allowing them to allocate space in advance. 91 97 92 98 include::line-range-options.adoc[] 93 99 94 - <revision-range>:: 100 + _<revision-range>_:: 95 101 Show only commits in the specified revision range. When no 96 - <revision-range> is specified, it defaults to `HEAD` (i.e. the 102 + _<revision-range>_ is specified, it defaults to `HEAD` (i.e. the 97 103 whole history leading to the current commit). `origin..HEAD` 98 104 specifies all the commits reachable from the current commit 99 105 (i.e. `HEAD`), but not from `origin`. For a complete list of 100 - ways to spell <revision-range>, see the 'Specifying Ranges' 106 + ways to spell _<revision-range>_, see the 'Specifying Ranges' 101 107 section of linkgit:gitrevisions[7]. 102 108 103 - [--] <path>...:: 109 + `[--] <path>...`:: 104 110 Show only commits that are enough to explain how the files 105 111 that match the specified paths came to be. See 'History 106 112 Simplification' below for details and other simplification ··· 145 151 146 152 `git log --since="2 weeks ago" -- gitk`:: 147 153 148 - Show the changes during the last two weeks to the file 'gitk'. 154 + Show the changes during the last two weeks to the file `gitk`. 149 155 The `--` is necessary to avoid confusion with the *branch* named 150 - 'gitk' 156 + `gitk` 151 157 152 158 `git log --name-status release..test`:: 153 159 154 - Show the commits that are in the "test" branch but not yet 155 - in the "release" branch, along with the list of paths 160 + Show the commits that are in the "`test`" branch but not yet 161 + in the "`release`" branch, along with the list of paths 156 162 each commit modifies. 157 163 158 164 `git log --follow builtin/rev-list.c`:: ··· 164 170 `git log --branches --not --remotes=origin`:: 165 171 166 172 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 173 + any of remote-tracking branches for `origin` (what you have that 168 174 origin doesn't). 169 175 170 176 `git log master --not --remotes=*/master`:: ··· 200 206 See linkgit:git-config[1] for core variables and linkgit:git-diff[1] 201 207 for settings related to diff generation. 202 208 203 - format.pretty:: 209 + `format.pretty`:: 204 210 Default for the `--format` option. (See 'Pretty Formats' above.) 205 211 Defaults to `medium`. 206 212 207 - i18n.logOutputEncoding:: 213 + `i18n.logOutputEncoding`:: 208 214 Encoding to use when displaying logs. (See 'Discussion' above.) 209 215 Defaults to the value of `i18n.commitEncoding` if set, and UTF-8 210 216 otherwise.