Git fork

Merge branch 'ja/doc-git-log-markup'

Doc mark-up updates.

* ja/doc-git-log-markup:
doc: git-log: convert log config to new doc format
doc: git-log: convert diff options to new doc format
doc: git-log: convert pretty formats to new doc format
doc: git-log: convert pretty options to new doc format
doc: git-log: convert rev list options to new doc format
doc: git-log: convert line range format to new doc format
doc: git-log: convert line range options to new doc format
doc: git-log convert rev-list-description to new doc format
doc: convert git-log to new documentation format

+492 -471
+1 -1
Documentation/asciidoc.conf.in
··· 43 43 endif::doctype-book[] 44 44 45 45 [literal-inlinemacro] 46 - {eval:re.sub(r'(&lt;[-a-zA-Z0-9.]+&gt;)', r'<emphasis>\1</emphasis>', re.sub(r'([\[\s|()>]|^|\]|&gt;)(\.?([-a-zA-Z0-9:+=~@\\\*\/_^\$]+\.?)+|,)',r'\1<literal>\2</literal>', re.sub(r'(\.\.\.?)([^\]$.])', r'<literal>\1</literal>\2', macros.passthroughs[int(attrs['passtext'][1:-1])] if attrs['passtext'][1:-1].isnumeric() else attrs['passtext'][1:-1])))} 46 + {eval:re.sub(r'(&lt;[-a-zA-Z0-9.]+&gt;)', r'<emphasis>\1</emphasis>', re.sub(r'([\[\s|()>]|^|\]|&gt;)(\.?([-a-zA-Z0-9:+=~@\\\*\/_^\$%]+\.?)+|,)',r'\1<literal>\2</literal>', re.sub(r'(\.\.\.?)([^\]$.])', r'<literal>\1</literal>\2', macros.passthroughs[int(attrs['passtext'][1:-1])] if attrs['passtext'][1:-1].isnumeric() else attrs['passtext'][1:-1])))} 47 47 48 48 endif::backend-docbook[] 49 49
+2 -2
Documentation/asciidoctor-extensions.rb.in
··· 73 73 elsif type == :monospaced 74 74 node.text.gsub(/(\.\.\.?)([^\]$\.])/, '<literal>\1</literal>\2') 75 75 .gsub(/^\.\.\.?$/, '<literal>\0</literal>') 76 - .gsub(%r{([\[\s|()>.]|^|\]|&gt;)(\.?([-a-zA-Z0-9:+=~@/_^\$\\\*]+\.{0,2})+|,)}, '\1<literal>\2</literal>') 76 + .gsub(%r{([\[\s|()>.]|^|\]|&gt;)(\.?([-a-zA-Z0-9:+=~@/_^\$\\\*%]+\.{0,2})+|,)}, '\1<literal>\2</literal>') 77 77 .gsub(/(&lt;[-a-zA-Z0-9.]+&gt;)/, '<emphasis>\1</emphasis>') 78 78 else 79 79 open, close, supports_phrase = QUOTE_TAGS[type] ··· 102 102 if node.type == :monospaced 103 103 node.text.gsub(/(\.\.\.?)([^\]$.])/, '<code>\1</code>\2') 104 104 .gsub(/^\.\.\.?$/, '<code>\0</code>') 105 - .gsub(%r{([\[\s|()>.]|^|\]|&gt;)(\.?([-a-zA-Z0-9:+=~@,/_^\$\\\*]+\.{0,2})+)}, '\1<code>\2</code>') 105 + .gsub(%r{([\[\s|()>.]|^|\]|&gt;)(\.?([-a-zA-Z0-9:+=~@,/_^\$\\\*%]+\.{0,2})+)}, '\1<code>\2</code>') 106 106 .gsub(/(&lt;[-a-zA-Z0-9.]+&gt;)/, '<em>\1</em>') 107 107 108 108 else
+26 -21
Documentation/config/log.adoc
··· 1 - log.abbrevCommit:: 2 - If true, makes 1 + `log.abbrevCommit`:: 2 + If `true`, make 3 3 ifndef::with-breaking-changes[] 4 4 linkgit:git-log[1], linkgit:git-show[1], and 5 5 linkgit:git-whatchanged[1] ··· 10 10 assume `--abbrev-commit`. You may 11 11 override this option with `--no-abbrev-commit`. 12 12 13 - log.date:: 14 - Set the default date-time mode for the 'log' command. 15 - Setting a value for log.date is similar to using 'git log''s 13 + `log.date`:: 14 + Set the default date-time mode for the `log` command. 15 + Setting a value for log.date is similar to using `git log`'s 16 16 `--date` option. See linkgit:git-log[1] for details. 17 17 + 18 18 If the format is set to "auto:foo" and the pager is in use, format 19 19 "foo" will be used for the date format. Otherwise, "default" will 20 20 be used. 21 21 22 - log.decorate:: 22 + `log.decorate`:: 23 23 Print out the ref names of any commits that are shown by the log 24 - command. If 'short' is specified, the ref name prefixes 'refs/heads/', 25 - 'refs/tags/' and 'refs/remotes/' will not be printed. If 'full' is 26 - specified, the full ref name (including prefix) will be printed. 27 - If 'auto' is specified, then if the output is going to a terminal, 28 - the ref names are shown as if 'short' were given, otherwise no ref 29 - names are shown. This is the same as the `--decorate` option 30 - of the `git log`. 24 + command. Possible values are: 25 + + 26 + ---- 27 + `short`;; the ref name prefixes `refs/heads/`, `refs/tags/` and 28 + `refs/remotes/` are not printed. 29 + `full`;; the full ref name (including prefix) are printed. 30 + `auto`;; if the output is going to a terminal, 31 + the ref names are shown as if `short` were given, otherwise no ref 32 + names are shown. 33 + ---- 34 + + 35 + This is the same as the `--decorate` option of the `git log`. 31 36 32 - log.initialDecorationSet:: 37 + `log.initialDecorationSet`:: 33 38 By default, `git log` only shows decorations for certain known ref 34 39 namespaces. If 'all' is specified, then show all refs as 35 40 decorations. 36 41 37 - log.excludeDecoration:: 42 + `log.excludeDecoration`:: 38 43 Exclude the specified patterns from the log decorations. This is 39 44 similar to the `--decorate-refs-exclude` command-line option, but 40 45 the config option can be overridden by the `--decorate-refs` 41 46 option. 42 47 43 - log.diffMerges:: 48 + `log.diffMerges`:: 44 49 Set diff format to be used when `--diff-merges=on` is 45 50 specified, see `--diff-merges` in linkgit:git-log[1] for 46 51 details. Defaults to `separate`. 47 52 48 - log.follow:: 53 + `log.follow`:: 49 54 If `true`, `git log` will act as if the `--follow` option was used when 50 55 a single <path> is given. This has the same limitations as `--follow`, 51 56 i.e. it cannot be used to follow multiple files and does not work well 52 57 on non-linear history. 53 58 54 - log.graphColors:: 59 + `log.graphColors`:: 55 60 A list of colors, separated by commas, that can be used to draw 56 61 history lines in `git log --graph`. 57 62 58 - log.showRoot:: 63 + `log.showRoot`:: 59 64 If true, the initial commit will be shown as a big creation event. 60 65 This is equivalent to a diff against an empty tree. 61 66 Tools like linkgit:git-log[1] or linkgit:git-whatchanged[1], which 62 67 normally hide the root commit will now show it. True by default. 63 68 64 - log.showSignature:: 69 + `log.showSignature`:: 65 70 If true, makes linkgit:git-log[1], linkgit:git-show[1], and 66 71 linkgit:git-whatchanged[1] assume `--show-signature`. 67 72 68 - log.mailmap:: 73 + `log.mailmap`:: 69 74 If true, makes linkgit:git-log[1], linkgit:git-show[1], and 70 75 linkgit:git-whatchanged[1] assume `--use-mailmap`, otherwise 71 76 assume `--no-use-mailmap`. True by default.
+23 -17
Documentation/diff-options.adoc
··· 37 37 endif::git-format-patch[] 38 38 39 39 ifdef::git-log[] 40 - -m:: 40 + `-m`:: 41 41 Show diffs for merge commits in the default format. This is 42 42 similar to `--diff-merges=on`, except `-m` will 43 43 produce no output unless `-p` is given as well. 44 44 45 - -c:: 45 + `-c`:: 46 46 Produce combined diff output for merge commits. 47 47 Shortcut for `--diff-merges=combined -p`. 48 48 49 - --cc:: 49 + `--cc`:: 50 50 Produce dense combined diff output for merge commits. 51 51 Shortcut for `--diff-merges=dense-combined -p`. 52 52 53 - --dd:: 53 + `--dd`:: 54 54 Produce diff with respect to first parent for both merge and 55 55 regular commits. 56 56 Shortcut for `--diff-merges=first-parent -p`. 57 57 58 - --remerge-diff:: 58 + `--remerge-diff`:: 59 59 Produce remerge-diff output for merge commits. 60 60 Shortcut for `--diff-merges=remerge -p`. 61 61 62 - --no-diff-merges:: 62 + `--no-diff-merges`:: 63 63 Synonym for `--diff-merges=off`. 64 64 65 - --diff-merges=<format>:: 65 + `--diff-merges=<format>`:: 66 66 Specify diff format to be used for merge commits. Default is 67 67 {diff-merges-default} unless `--first-parent` is in use, in 68 68 which case `first-parent` is the default. ··· 70 70 The following formats are supported: 71 71 + 72 72 -- 73 - off, none:: 73 + `off`:: 74 + `none`:: 74 75 Disable output of diffs for merge commits. Useful to override 75 76 implied value. 76 77 77 - on, m:: 78 + `on`:: 79 + `m`:: 78 80 Make diff output for merge commits to be shown in the default 79 81 format. The default format can be changed using 80 82 `log.diffMerges` configuration variable, whose default value 81 83 is `separate`. 82 84 83 - first-parent, 1:: 85 + `first-parent`:: 86 + `1`:: 84 87 Show full diff with respect to first parent. This is the same 85 88 format as `--patch` produces for non-merge commits. 86 89 87 - separate:: 90 + `separate`:: 88 91 Show full diff with respect to each of parents. 89 92 Separate log entry and diff is generated for each parent. 90 93 91 - combined, c:: 94 + `combined`:: 95 + `c`:: 92 96 Show differences from each of the parents to the merge 93 97 result simultaneously instead of showing pairwise diff between 94 98 a parent and the result one at a time. Furthermore, it lists 95 99 only files which were modified from all parents. 96 100 97 - dense-combined, cc:: 101 + `dense-combined`:: 102 + `cc`:: 98 103 Further compress output produced by `--diff-merges=combined` 99 104 by omitting uninteresting hunks whose contents in the parents 100 105 have only two variants and the merge result picks one of them 101 106 without modification. 102 107 103 - remerge, r:: 104 - Remerge two-parent merge commits to create a temporary tree 108 + `remerge`:: 109 + `r`:: Remerge two-parent merge commits to create a temporary tree 105 110 object--potentially containing files with conflict markers 106 111 and such. A diff is then shown between that temporary tree 107 112 and the actual merge commit. 113 + -- 108 114 + 109 115 The output emitted when this option is used is subject to change, and 110 116 so is its interaction with other options (unless explicitly 111 117 documented). 112 - -- 113 118 114 - --combined-all-paths:: 119 + 120 + `--combined-all-paths`:: 115 121 Cause combined diffs (used for merge commits) to 116 122 list the name of the file from all parents. It thus only has 117 123 effect when `--diff-merges=[dense-]combined` is in use, and
+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.
+13 -13
Documentation/line-range-format.adoc
··· 1 - '<start>' and '<end>' can take one of these forms: 1 + _<start>_ and _<end>_ can take one of these forms: 2 2 3 - - number 3 + - _<number>_ 4 4 + 5 - If '<start>' or '<end>' is a number, it specifies an 5 + If _<start>_ or _<end>_ is a number, it specifies an 6 6 absolute line number (lines count from 1). 7 7 + 8 8 9 - - `/regex/` 9 + - `/<regex>/` 10 10 + 11 11 This form will use the first line matching the given 12 - POSIX regex. If '<start>' is a regex, it will search from the end of 12 + POSIX _<regex>_. If _<start>_ is a regex, it will search from the end of 13 13 the previous `-L` range, if any, otherwise from the start of file. 14 - If '<start>' is `^/regex/`, it will search from the start of file. 15 - If '<end>' is a regex, it will search 16 - starting at the line given by '<start>'. 14 + If _<start>_ is `^/<regex>/`, it will search from the start of file. 15 + If _<end>_ is a regex, it will search starting at the line given by 16 + _<start>_. 17 17 + 18 18 19 - - +offset or -offset 19 + - `+<offset>` or `-<offset>` 20 20 + 21 - This is only valid for '<end>' and will specify a number 22 - of lines before or after the line given by '<start>'. 21 + This is only valid for _<end>_ and will specify a number 22 + of lines before or after the line given by _<start>_. 23 23 24 24 + 25 - If `:<funcname>` is given in place of '<start>' and '<end>', it is a 25 + If `:<funcname>` is given in place of _<start>_ and _<end>_, it is a 26 26 regular expression that denotes the range from the first funcname line 27 - that matches '<funcname>', up to the next funcname line. `:<funcname>` 27 + that matches _<funcname>_, up to the next funcname line. `:<funcname>` 28 28 searches from the end of the previous `-L` range, if any, otherwise 29 29 from the start of file. `^:<funcname>` searches from the start of 30 30 file. The function names are determined in the same way as `git diff`
+5 -5
Documentation/line-range-options.adoc
··· 1 - -L<start>,<end>:<file>:: 2 - -L:<funcname>:<file>:: 1 + `-L<start>,<end>:<file>`:: 2 + `-L:<funcname>:<file>`:: 3 3 4 - Trace the evolution of the line range given by '<start>,<end>', 5 - or by the function name regex '<funcname>', within the '<file>'. You may 4 + Trace the evolution of the line range given by `<start>,<end>`, 5 + or by the function name regex _<funcname>_, within the _<file>_. You may 6 6 not give any pathspec limiters. This is currently limited to 7 7 a walk starting from a single revision, i.e., you may only 8 8 give zero or one positive revision arguments, and 9 - '<start>' and '<end>' (or '<funcname>') must exist in the starting revision. 9 + _<start>_ and _<end>_ (or _<funcname>_) must exist in the starting revision. 10 10 You can specify this option more than once. Implies `--patch`. 11 11 Patch output can be suppressed using `--no-patch`, but other diff formats 12 12 (namely `--raw`, `--numstat`, `--shortstat`, `--dirstat`, `--summary`,
+143 -140
Documentation/pretty-formats.adoc
··· 2 2 -------------- 3 3 4 4 If the commit is a merge, and if the pretty-format 5 - is not 'oneline', 'email' or 'raw', an additional line is 6 - inserted before the 'Author:' line. This line begins with 5 + is not `oneline`, `email` or `raw`, an additional line is 6 + inserted before the `Author:` line. This line begins with 7 7 "Merge: " and the hashes of ancestral commits are printed, 8 8 separated by spaces. Note that the listed commits may not 9 - necessarily be the list of the *direct* parent commits if you 9 + necessarily be the list of the 'direct' parent commits if you 10 10 have limited your view of history: for example, if you are 11 11 only interested in changes related to a certain directory or 12 12 file. ··· 14 14 There are several built-in formats, and you can define 15 15 additional formats by setting a pretty.<name> 16 16 config option to either another format name, or a 17 - 'format:' string, as described below (see 17 + `format:` string, as described below (see 18 18 linkgit:git-config[1]). Here are the details of the 19 19 built-in formats: 20 20 21 - * 'oneline' 21 + * `oneline` 22 22 23 23 <hash> <title-line> 24 24 + 25 25 This is designed to be as compact as possible. 26 26 27 - * 'short' 27 + * `short` 28 28 29 29 commit <hash> 30 30 Author: <author> 31 31 32 32 <title-line> 33 33 34 - * 'medium' 34 + * `medium` 35 35 36 36 commit <hash> 37 37 Author: <author> ··· 41 41 42 42 <full-commit-message> 43 43 44 - * 'full' 44 + * `full` 45 45 46 46 commit <hash> 47 47 Author: <author> ··· 51 51 52 52 <full-commit-message> 53 53 54 - * 'fuller' 54 + * `fuller` 55 55 56 56 commit <hash> 57 57 Author: <author> ··· 63 63 64 64 <full-commit-message> 65 65 66 - * 'reference' 66 + * `reference` 67 67 68 68 <abbrev-hash> (<title-line>, <short-author-date>) 69 69 + 70 70 This format is used to refer to another commit in a commit message and 71 - is the same as `--pretty='format:%C(auto)%h (%s, %ad)'`. By default, 71 + is the same as ++--pretty=\'format:%C(auto)%h (%s, %ad)'++. By default, 72 72 the date is formatted with `--date=short` unless another `--date` option 73 73 is explicitly specified. As with any `format:` with format 74 74 placeholders, its output is not affected by other options like 75 75 `--decorate` and `--walk-reflogs`. 76 76 77 - * 'email' 77 + * `email` 78 78 79 79 From <hash> <date> 80 80 From: <author> ··· 83 83 84 84 <full-commit-message> 85 85 86 - * 'mboxrd' 86 + * `mboxrd` 87 87 + 88 - Like 'email', but lines in the commit message starting with "From " 88 + Like `email`, but lines in the commit message starting with "From " 89 89 (preceded by zero or more ">") are quoted with ">" so they aren't 90 90 confused as starting a new commit. 91 91 92 - * 'raw' 92 + * `raw` 93 93 + 94 - The 'raw' format shows the entire commit exactly as 94 + The `raw` format shows the entire commit exactly as 95 95 stored in the commit object. Notably, the hashes are 96 - displayed in full, regardless of whether --abbrev or 97 - --no-abbrev are used, and 'parents' information show the 96 + displayed in full, regardless of whether `--abbrev` or 97 + `--no-abbrev` are used, and 'parents' information show the 98 98 true parent commits, without taking grafts or history 99 99 simplification into account. Note that this format affects the way 100 100 commits are displayed, but not the way the diff is shown e.g. with 101 101 `git log --raw`. To get full object names in a raw diff format, 102 102 use `--no-abbrev`. 103 103 104 - * 'format:<format-string>' 104 + * `format:<format-string>` 105 105 + 106 - The 'format:<format-string>' format allows you to specify which information 106 + The `format:<format-string>` format allows you to specify which information 107 107 you want to show. It works a little bit like printf format, 108 - with the notable exception that you get a newline with '%n' 109 - instead of '\n'. 108 + with the notable exception that you get a newline with `%n` 109 + instead of `\n`. 110 110 + 111 111 E.g, 'format:"The author of %h was %an, %ar%nThe title was >>%s<<%n"' 112 112 would show something like this: ··· 120 120 The placeholders are: 121 121 122 122 - Placeholders that expand to a single literal character: 123 - '%n':: newline 124 - '%%':: a raw '%' 125 - '%x00':: '%x' followed by two hexadecimal digits is replaced with a 123 + ++%n++:: newline 124 + ++%%++:: a raw ++%++ 125 + ++%x00++:: ++%x++ followed by two hexadecimal digits is replaced with a 126 126 byte with the hexadecimal digits' value (we will call this 127 127 "literal formatting code" in the rest of this document). 128 128 129 129 - Placeholders that affect formatting of later placeholders: 130 - '%Cred':: switch color to red 131 - '%Cgreen':: switch color to green 132 - '%Cblue':: switch color to blue 133 - '%Creset':: reset color 134 - '%C(...)':: color specification, as described under Values in the 130 + ++%Cred++:: switch color to red 131 + ++%Cgreen++:: switch color to green 132 + ++%Cblue++:: switch color to blue 133 + ++%Creset++:: reset color 134 + ++%C(++_<spec>_++)++:: color specification, as described under Values in the 135 135 "CONFIGURATION FILE" section of linkgit:git-config[1]. By 136 136 default, colors are shown only when enabled for log output 137 137 (by `color.diff`, `color.ui`, or `--color`, and respecting 138 138 the `auto` settings of the former if we are going to a 139 - terminal). `%C(auto,...)` is accepted as a historical 140 - synonym for the default (e.g., `%C(auto,red)`). Specifying 141 - `%C(always,...)` will show the colors even when color is 139 + terminal). ++%C(auto,++_<spec>_++)++ is accepted as a historical 140 + synonym for the default (e.g., ++%C(auto,red)++). Specifying 141 + ++%C(always,++_<spec>_++)++ will show the colors even when color is 142 142 not otherwise enabled (though consider just using 143 - `--color=always` to enable color for the whole output, 143 + `--color=always` to enable color for the whole output, 144 144 including this format and anything else git might color). 145 - `auto` alone (i.e. `%C(auto)`) will turn on auto coloring 145 + `auto` alone (i.e. ++%C(auto)++) will turn on auto coloring 146 146 on the next placeholders until the color is switched 147 147 again. 148 - '%m':: left (`<`), right (`>`) or boundary (`-`) mark 149 - '%w([<w>[,<i1>[,<i2>]]])':: switch line wrapping, like the -w option of 148 + ++%m++:: left (`<`), right (`>`) or boundary (`-`) mark 149 + ++%w(++`[<w>[,<i1>[,<i2>]]]`++)++:: switch line wrapping, like the `-w` option of 150 150 linkgit:git-shortlog[1]. 151 - '%<( <N> [,trunc|ltrunc|mtrunc])':: make the next placeholder take at 151 + ++%<(++`<n>[,(trunc|ltrunc|mtrunc)]`++)++:: make the next placeholder take at 152 152 least N column widths, padding spaces on 153 153 the right if necessary. Optionally 154 - truncate (with ellipsis '..') at the left (ltrunc) `..ft`, 154 + truncate (with ellipsis `..`) at the left (ltrunc) `..ft`, 155 155 the middle (mtrunc) `mi..le`, or the end 156 156 (trunc) `rig..`, if the output is longer than 157 - N columns. 157 + _<n>_ columns. 158 158 Note 1: that truncating 159 - only works correctly with N >= 2. 160 - Note 2: spaces around the N and M (see below) 159 + only works correctly with _<n>_ >= 2. 160 + Note 2: spaces around the _<n>_ and _<m>_ (see below) 161 161 values are optional. 162 162 Note 3: Emojis and other wide characters 163 163 will take two display columns, which may 164 164 over-run column boundaries. 165 165 Note 4: decomposed character combining marks 166 166 may be misplaced at padding boundaries. 167 - '%<|( <M> )':: make the next placeholder take at least until Mth 167 + ++%<|(++_<m>_ ++)++:: make the next placeholder take at least until _<m>_ th 168 168 display column, padding spaces on the right if necessary. 169 - Use negative M values for column positions measured 169 + Use negative _<m>_ values for column positions measured 170 170 from the right hand edge of the terminal window. 171 - '%>( <N> )', '%>|( <M> )':: similar to '%<( <N> )', '%<|( <M> )' respectively, 171 + ++%>(++_<n>_++)++:: 172 + ++%>|(++_<m>_++)++:: similar to ++%<(++_<n>_++)++, ++%<|(++_<m>_++)++ respectively, 172 173 but padding spaces on the left 173 - '%>>( <N> )', '%>>|( <M> )':: similar to '%>( <N> )', '%>|( <M> )' 174 + ++%>>(++_<n>_++)++:: 175 + ++%>>|(++_<m>_++)++:: similar to ++%>(++_<n>_++)++, ++%>|(++_<m>_++)++ 174 176 respectively, except that if the next 175 177 placeholder takes more spaces than given and 176 178 there are spaces on its left, use those 177 179 spaces 178 - '%><( <N> )', '%><|( <M> )':: similar to '%<( <N> )', '%<|( <M> )' 180 + ++%><(++_<n>_++)++:: 181 + ++%><|(++_<m>_++)++:: similar to ++%<(++_<n>_++)++, ++%<|(++_<m>_++)++ 179 182 respectively, but padding both sides 180 183 (i.e. the text is centered) 181 184 182 185 - Placeholders that expand to information extracted from the commit: 183 - '%H':: commit hash 184 - '%h':: abbreviated commit hash 185 - '%T':: tree hash 186 - '%t':: abbreviated tree hash 187 - '%P':: parent hashes 188 - '%p':: abbreviated parent hashes 189 - '%an':: author name 190 - '%aN':: author name (respecting .mailmap, see linkgit:git-shortlog[1] 186 + +%H+:: commit hash 187 + +%h+:: abbreviated commit hash 188 + +%T+:: tree hash 189 + +%t+:: abbreviated tree hash 190 + +%P+:: parent hashes 191 + +%p+:: abbreviated parent hashes 192 + +%an+:: author name 193 + +%aN+:: author name (respecting .mailmap, see linkgit:git-shortlog[1] 191 194 or linkgit:git-blame[1]) 192 - '%ae':: author email 193 - '%aE':: author email (respecting .mailmap, see linkgit:git-shortlog[1] 195 + +%ae+:: author email 196 + +%aE+:: author email (respecting .mailmap, see linkgit:git-shortlog[1] 194 197 or linkgit:git-blame[1]) 195 - '%al':: author email local-part (the part before the '@' sign) 196 - '%aL':: author local-part (see '%al') respecting .mailmap, see 198 + +%al+:: author email local-part (the part before the `@` sign) 199 + +%aL+:: author local-part (see +%al+) respecting .mailmap, see 197 200 linkgit:git-shortlog[1] or linkgit:git-blame[1]) 198 - '%ad':: author date (format respects --date= option) 199 - '%aD':: author date, RFC2822 style 200 - '%ar':: author date, relative 201 - '%at':: author date, UNIX timestamp 202 - '%ai':: author date, ISO 8601-like format 203 - '%aI':: author date, strict ISO 8601 format 204 - '%as':: author date, short format (`YYYY-MM-DD`) 205 - '%ah':: author date, human style (like the `--date=human` option of 201 + +%ad+:: author date (format respects --date= option) 202 + +%aD+:: author date, RFC2822 style 203 + +%ar+:: author date, relative 204 + +%at+:: author date, UNIX timestamp 205 + +%ai+:: author date, ISO 8601-like format 206 + +%aI+:: author date, strict ISO 8601 format 207 + +%as+:: author date, short format (`YYYY-MM-DD`) 208 + +%ah+:: author date, human style (like the `--date=human` option of 206 209 linkgit:git-rev-list[1]) 207 - '%cn':: committer name 208 - '%cN':: committer name (respecting .mailmap, see 210 + +%cn+:: committer name 211 + +%cN+:: committer name (respecting .mailmap, see 209 212 linkgit:git-shortlog[1] or linkgit:git-blame[1]) 210 - '%ce':: committer email 211 - '%cE':: committer email (respecting .mailmap, see 213 + +%ce+:: committer email 214 + +%cE+:: committer email (respecting .mailmap, see 212 215 linkgit:git-shortlog[1] or linkgit:git-blame[1]) 213 - '%cl':: committer email local-part (the part before the '@' sign) 214 - '%cL':: committer local-part (see '%cl') respecting .mailmap, see 216 + +%cl+:: committer email local-part (the part before the `@` sign) 217 + +%cL+:: committer local-part (see +%cl+) respecting .mailmap, see 215 218 linkgit:git-shortlog[1] or linkgit:git-blame[1]) 216 - '%cd':: committer date (format respects --date= option) 217 - '%cD':: committer date, RFC2822 style 218 - '%cr':: committer date, relative 219 - '%ct':: committer date, UNIX timestamp 220 - '%ci':: committer date, ISO 8601-like format 221 - '%cI':: committer date, strict ISO 8601 format 222 - '%cs':: committer date, short format (`YYYY-MM-DD`) 223 - '%ch':: committer date, human style (like the `--date=human` option of 219 + +%cd+:: committer date (format respects --date= option) 220 + +%cD+:: committer date, RFC2822 style 221 + +%cr+:: committer date, relative 222 + +%ct+:: committer date, UNIX timestamp 223 + +%ci+:: committer date, ISO 8601-like format 224 + +%cI+:: committer date, strict ISO 8601 format 225 + +%cs+:: committer date, short format (`YYYY-MM-DD`) 226 + +%ch+:: committer date, human style (like the `--date=human` option of 224 227 linkgit:git-rev-list[1]) 225 - '%d':: ref names, like the --decorate option of linkgit:git-log[1] 226 - '%D':: ref names without the " (", ")" wrapping. 227 - '%(decorate[:<options>])':: 228 + +%d+:: ref names, like the --decorate option of linkgit:git-log[1] 229 + +%D+:: ref names without the " (", ")" wrapping. 230 + ++%(decorate++`[:<option>,...]`++)++:: 228 231 ref names with custom decorations. The `decorate` string may be followed by a 229 232 colon and zero or more comma-separated options. Option values may contain 230 233 literal formatting codes. These must be used for commas (`%x2C`) and closing 231 234 parentheses (`%x29`), due to their role in the option syntax. 232 235 + 233 - ** 'prefix=<value>': Shown before the list of ref names. Defaults to "{nbsp}`(`". 234 - ** 'suffix=<value>': Shown after the list of ref names. Defaults to "`)`". 235 - ** 'separator=<value>': Shown between ref names. Defaults to "`,`{nbsp}". 236 - ** 'pointer=<value>': Shown between HEAD and the branch it points to, if any. 237 - Defaults to "{nbsp}`->`{nbsp}". 238 - ** 'tag=<value>': Shown before tag names. Defaults to "`tag:`{nbsp}". 236 + ** `prefix=<value>`: Shown before the list of ref names. Defaults to "{nbsp}+(+". 237 + ** `suffix=<value>`: Shown after the list of ref names. Defaults to "+)+". 238 + ** `separator=<value>`: Shown between ref names. Defaults to "+,+{nbsp}". 239 + ** `pointer=<value>`: Shown between HEAD and the branch it points to, if any. 240 + Defaults to "{nbsp}+->+{nbsp}". 241 + ** `tag=<value>`: Shown before tag names. Defaults to "`tag:`{nbsp}". 239 242 240 243 + 241 244 For example, to produce decorations with no wrapping 242 245 or tag annotations, and spaces as separators: 243 246 + 244 - `%(decorate:prefix=,suffix=,tag=,separator= )` 247 + ++%(decorate:prefix=,suffix=,tag=,separator= )++ 245 248 246 - '%(describe[:<options>])':: 249 + ++%(describe++`[:<option>,...]`++)++:: 247 250 human-readable name, like linkgit:git-describe[1]; empty string for 248 251 undescribable commits. The `describe` string may be followed by a colon and 249 252 zero or more comma-separated options. Descriptions can be inconsistent when 250 253 tags are added or removed at the same time. 251 254 + 252 - ** 'tags[=<bool-value>]': Instead of only considering annotated tags, 255 + ** `tags[=<bool-value>]`: Instead of only considering annotated tags, 253 256 consider lightweight tags as well. 254 - ** 'abbrev=<number>': Instead of using the default number of hexadecimal digits 257 + ** `abbrev=<number>`: Instead of using the default number of hexadecimal digits 255 258 (which will vary according to the number of objects in the repository with a 256 259 default of 7) of the abbreviated object name, use <number> digits, or as many 257 260 digits as needed to form a unique object name. 258 - ** 'match=<pattern>': Only consider tags matching the given 259 - `glob(7)` pattern, excluding the "refs/tags/" prefix. 260 - ** 'exclude=<pattern>': Do not consider tags matching the given 261 - `glob(7)` pattern, excluding the "refs/tags/" prefix. 261 + ** `match=<pattern>`: Only consider tags matching the given 262 + `glob(7)` _<pattern>_, excluding the `refs/tags/` prefix. 263 + ** `exclude=<pattern>`: Do not consider tags matching the given 264 + `glob(7)` _<pattern>_, excluding the `refs/tags/` prefix. 262 265 263 - '%S':: ref name given on the command line by which the commit was reached 266 + +%S+:: ref name given on the command line by which the commit was reached 264 267 (like `git log --source`), only works with `git log` 265 - '%e':: encoding 266 - '%s':: subject 267 - '%f':: sanitized subject line, suitable for a filename 268 - '%b':: body 269 - '%B':: raw body (unwrapped subject and body) 268 + +%e+:: encoding 269 + +%s+:: subject 270 + +%f+:: sanitized subject line, suitable for a filename 271 + +%b+:: body 272 + +%B+:: raw body (unwrapped subject and body) 270 273 ifndef::git-rev-list[] 271 - '%N':: commit notes 274 + +%N+:: commit notes 272 275 endif::git-rev-list[] 273 - '%GG':: raw verification message from GPG for a signed commit 274 - '%G?':: show "G" for a good (valid) signature, 276 + +%GG+:: raw verification message from GPG for a signed commit 277 + +%G?+:: show "G" for a good (valid) signature, 275 278 "B" for a bad signature, 276 279 "U" for a good signature with unknown validity, 277 280 "X" for a good signature that has expired, ··· 279 282 "R" for a good signature made by a revoked key, 280 283 "E" if the signature cannot be checked (e.g. missing key) 281 284 and "N" for no signature 282 - '%GS':: show the name of the signer for a signed commit 283 - '%GK':: show the key used to sign a signed commit 284 - '%GF':: show the fingerprint of the key used to sign a signed commit 285 - '%GP':: show the fingerprint of the primary key whose subkey was used 285 + +%GS+:: show the name of the signer for a signed commit 286 + +%GK+:: show the key used to sign a signed commit 287 + +%GF+:: show the fingerprint of the key used to sign a signed commit 288 + +%GP+:: show the fingerprint of the primary key whose subkey was used 286 289 to sign a signed commit 287 - '%GT':: show the trust level for the key used to sign a signed commit 288 - '%gD':: reflog selector, e.g., `refs/stash@{1}` or `refs/stash@{2 290 + +%GT+:: show the trust level for the key used to sign a signed commit 291 + +%gD+:: reflog selector, e.g., `refs/stash@{1}` or `refs/stash@{2 289 292 minutes ago}`; the format follows the rules described for the 290 293 `-g` option. The portion before the `@` is the refname as 291 294 given on the command line (so `git log -g refs/heads/master` 292 295 would yield `refs/heads/master@{0}`). 293 - '%gd':: shortened reflog selector; same as `%gD`, but the refname 296 + +%gd+:: shortened reflog selector; same as `%gD`, but the refname 294 297 portion is shortened for human readability (so 295 298 `refs/heads/master` becomes just `master`). 296 - '%gn':: reflog identity name 297 - '%gN':: reflog identity name (respecting .mailmap, see 299 + +%gn+:: reflog identity name 300 + +%gN+:: reflog identity name (respecting .mailmap, see 298 301 linkgit:git-shortlog[1] or linkgit:git-blame[1]) 299 - '%ge':: reflog identity email 300 - '%gE':: reflog identity email (respecting .mailmap, see 302 + +%ge+:: reflog identity email 303 + +%gE+:: reflog identity email (respecting .mailmap, see 301 304 linkgit:git-shortlog[1] or linkgit:git-blame[1]) 302 - '%gs':: reflog subject 303 - '%(trailers[:<options>])':: 305 + +%gs+:: reflog subject 306 + ++%(trailers++`[:<option>,...]`++)++:: 304 307 display the trailers of the body as interpreted by 305 308 linkgit:git-interpret-trailers[1]. The `trailers` string may be followed by 306 309 a colon and zero or more comma-separated options. If any option is provided 307 310 multiple times, the last occurrence wins. 308 311 + 309 - ** 'key=<key>': only show trailers with specified <key>. Matching is done 312 + ** `key=<key>`: only show trailers with specified <key>. Matching is done 310 313 case-insensitively and trailing colon is optional. If option is 311 314 given multiple times trailer lines matching any of the keys are 312 315 shown. This option automatically enables the `only` option so that 313 316 non-trailer lines in the trailer block are hidden. If that is not 314 317 desired it can be disabled with `only=false`. E.g., 315 - `%(trailers:key=Reviewed-by)` shows trailer lines with key 318 + +%(trailers:key=Reviewed-by)+ shows trailer lines with key 316 319 `Reviewed-by`. 317 - ** 'only[=<bool>]': select whether non-trailer lines from the trailer 320 + ** `only[=<bool>]`: select whether non-trailer lines from the trailer 318 321 block should be included. 319 - ** 'separator=<sep>': specify the separator inserted between trailer 322 + ** `separator=<sep>`: specify the separator inserted between trailer 320 323 lines. Defaults to a line feed character. The string <sep> may contain 321 324 the literal formatting codes described above. To use comma as 322 325 separator one must use `%x2C` as it would otherwise be parsed as 323 - next option. E.g., `%(trailers:key=Ticket,separator=%x2C )` 326 + next option. E.g., +%(trailers:key=Ticket,separator=%x2C )+ 324 327 shows all trailer lines whose key is "Ticket" separated by a comma 325 328 and a space. 326 - ** 'unfold[=<bool>]': make it behave as if interpret-trailer's `--unfold` 329 + ** `unfold[=<bool>]`: make it behave as if interpret-trailer's `--unfold` 327 330 option was given. E.g., 328 - `%(trailers:only,unfold=true)` unfolds and shows all trailer lines. 329 - ** 'keyonly[=<bool>]': only show the key part of the trailer. 330 - ** 'valueonly[=<bool>]': only show the value part of the trailer. 331 - ** 'key_value_separator=<sep>': specify the separator inserted between 331 + +%(trailers:only,unfold=true)+ unfolds and shows all trailer lines. 332 + ** `keyonly[=<bool>]`: only show the key part of the trailer. 333 + ** `valueonly[=<bool>]`: only show the value part of the trailer. 334 + ** `key_value_separator=<sep>`: specify the separator inserted between 332 335 the key and value of each trailer. Defaults to ": ". Otherwise it 333 - shares the same semantics as 'separator=<sep>' above. 336 + shares the same semantics as `separator=<sep>` above. 334 337 335 338 NOTE: Some placeholders may depend on other options given to the 336 - revision traversal engine. For example, the `%g*` reflog options will 339 + revision traversal engine. For example, the +%g*+ reflog options will 337 340 insert an empty string unless we are traversing reflog entries (e.g., by 338 - `git log -g`). The `%d` and `%D` placeholders will use the "short" 341 + `git log -g`). The +%d+ and +%D+ placeholders will use the "short" 339 342 decoration format if `--decorate` was not already provided on the command 340 343 line. 341 344 342 345 The boolean options accept an optional value `[=<bool-value>]`. The 343 - values taken by `--type=bool` git-config[1], like `yes` and `off`, 346 + values taken by `--type=bool` linkgit:git-config[1], like `yes` and `off`, 344 347 are all accepted. Giving a boolean option without `=<value>` is 345 348 equivalent to giving it with `=true`. 346 349 347 - If you add a `+` (plus sign) after '%' of a placeholder, a line-feed 350 + If you add a `+` (plus sign) after +%+ of a placeholder, a line-feed 348 351 is inserted immediately before the expansion if and only if the 349 352 placeholder expands to a non-empty string. 350 353 351 - If you add a `-` (minus sign) after '%' of a placeholder, all consecutive 354 + If you add a `-` (minus sign) after +%+ of a placeholder, all consecutive 352 355 line-feeds immediately preceding the expansion are deleted if and only if the 353 356 placeholder expands to an empty string. 354 357 355 - If you add a ` ` (space) after '%' of a placeholder, a space 358 + If you add a `' '` (space) after +%+ of a placeholder, a space 356 359 is inserted immediately before the expansion if and only if the 357 360 placeholder expands to a non-empty string. 358 361 359 - * 'tformat:' 362 + * `tformat:` 360 363 + 361 - The 'tformat:' format works exactly like 'format:', except that it 364 + The `tformat:` format works exactly like `format:`, except that it 362 365 provides "terminator" semantics instead of "separator" semantics. In 363 366 other words, each commit has the message terminator character (usually a 364 367 newline) appended, rather than a separator placed between entries. ··· 378 381 7134973 379 382 --------------------- 380 383 + 381 - In addition, any unrecognized string that has a `%` in it is interpreted 384 + In addition, any unrecognized string that has a +%+ in it is interpreted 382 385 as if it has `tformat:` in front of it. For example, these two are 383 386 equivalent: 384 387 +
+36 -35
Documentation/pretty-options.adoc
··· 1 - --pretty[=<format>]:: 2 - --format=<format>:: 1 + `--pretty[=<format>]`:: 2 + `--format=<format>`:: 3 3 4 4 Pretty-print the contents of the commit logs in a given format, 5 - where '<format>' can be one of 'oneline', 'short', 'medium', 6 - 'full', 'fuller', 'reference', 'email', 'raw', 'format:<string>' 7 - and 'tformat:<string>'. When '<format>' is none of the above, 8 - and has '%placeholder' in it, it acts as if 9 - '--pretty=tformat:<format>' were given. 5 + where '<format>' can be one of `oneline`, `short`, `medium`, 6 + `full`, `fuller`, `reference`, `email`, `raw`, `format:<string>` 7 + and `tformat:<string>`. When _<format>_ is none of the above, 8 + and has `%<placeholder>` in it, it acts as if 9 + `--pretty=tformat:<format>` were given. 10 10 + 11 11 See the "PRETTY FORMATS" section for some additional details for each 12 - format. When '=<format>' part is omitted, it defaults to 'medium'. 12 + format. When `=<format>` part is omitted, it defaults to `medium`. 13 13 + 14 - Note: you can specify the default pretty format in the repository 14 + NOTE: you can specify the default pretty format in the repository 15 15 configuration (see linkgit:git-config[1]). 16 16 17 - --abbrev-commit:: 17 + `--abbrev-commit`:: 18 18 Instead of showing the full 40-byte hexadecimal commit object 19 19 name, show a prefix that names the object uniquely. 20 - "--abbrev=<n>" (which also modifies diff output, if it is displayed) 20 + `--abbrev=<n>` (which also modifies diff output, if it is displayed) 21 21 option can be used to specify the minimum length of the prefix. 22 22 + 23 - This should make "--pretty=oneline" a whole lot more readable for 23 + This should make `--pretty=oneline` a whole lot more readable for 24 24 people using 80-column terminals. 25 25 26 - --no-abbrev-commit:: 26 + `--no-abbrev-commit`:: 27 27 Show the full 40-byte hexadecimal commit object name. This negates 28 28 `--abbrev-commit`, either explicit or implied by other options such 29 - as "--oneline". It also overrides the `log.abbrevCommit` variable. 29 + as `--oneline`. It also overrides the `log.abbrevCommit` variable. 30 30 31 - --oneline:: 32 - This is a shorthand for "--pretty=oneline --abbrev-commit" 31 + `--oneline`:: 32 + This is a shorthand for `--pretty=oneline --abbrev-commit` 33 33 used together. 34 34 35 - --encoding=<encoding>:: 35 + `--encoding=<encoding>`:: 36 36 Commit objects record the character encoding used for the log message 37 37 in their encoding header; this option can be used to tell the 38 38 command to re-code the commit log message in the encoding ··· 44 44 to convert the commit, we will quietly output the original 45 45 object verbatim. 46 46 47 - --expand-tabs=<n>:: 48 - --expand-tabs:: 49 - --no-expand-tabs:: 47 + `--expand-tabs=<n>`:: 48 + `--expand-tabs`:: 49 + `--no-expand-tabs`:: 50 50 Perform a tab expansion (replace each tab with enough spaces 51 - to fill to the next display column that is a multiple of '<n>') 51 + to fill to the next display column that is a multiple of _<n>_) 52 52 in the log message before showing it in the output. 53 53 `--expand-tabs` is a short-hand for `--expand-tabs=8`, and 54 54 `--no-expand-tabs` is a short-hand for `--expand-tabs=0`, 55 55 which disables tab expansion. 56 56 + 57 57 By default, tabs are expanded in pretty formats that indent the log 58 - message by 4 spaces (i.e. 'medium', which is the default, 'full', 59 - and 'fuller'). 58 + message by 4 spaces (i.e. `medium`, which is the default, `full`, 59 + and `fuller`). 60 60 61 61 ifndef::git-rev-list[] 62 - --notes[=<ref>]:: 62 + `--notes[=<ref>]`:: 63 63 Show the notes (see linkgit:git-notes[1]) that annotate the 64 64 commit, when showing the commit log message. This is the default 65 65 ifndef::with-breaking-changes[] ··· 80 80 with `refs/notes/`; when it begins with `notes/`, `refs/` and otherwise 81 81 `refs/notes/` is prefixed to form the full name of the ref. 82 82 + 83 - Multiple --notes options can be combined to control which notes are 84 - being displayed. Examples: "--notes=foo" will show only notes from 85 - "refs/notes/foo"; "--notes=foo --notes" will show both notes from 83 + Multiple `--notes` options can be combined to control which notes are 84 + being displayed. Examples: "`--notes=foo`" will show only notes from 85 + `refs/notes/foo`; "`--notes=foo --notes`" will show both notes from 86 86 "refs/notes/foo" and from the default notes ref(s). 87 87 88 - --no-notes:: 88 + `--no-notes`:: 89 89 Do not show notes. This negates the above `--notes` option, by 90 90 resetting the list of notes refs from which notes are shown. 91 91 Options are parsed in the order given on the command line, so e.g. 92 - "--notes --notes=foo --no-notes --notes=bar" will only show notes 93 - from "refs/notes/bar". 92 + "`--notes --notes=foo --no-notes --notes=bar`" will only show notes 93 + from `refs/notes/bar`. 94 94 95 - --show-notes-by-default:: 95 + `--show-notes-by-default`:: 96 96 Show the default notes unless options for displaying specific 97 97 notes are given. 98 98 99 - --show-notes[=<ref>]:: 100 - --[no-]standard-notes:: 101 - These options are deprecated. Use the above --notes/--no-notes 99 + `--show-notes[=<ref>]`:: 100 + `--standard-notes`:: 101 + `--no-standard-notes`:: 102 + These options are deprecated. Use the above `--notes`/`--no-notes` 102 103 options instead. 103 104 endif::git-rev-list[] 104 105 105 - --show-signature:: 106 + `--show-signature`:: 106 107 Check the validity of a signed commit object by passing the signature 107 108 to `gpg --verify` and show the output.
+3 -3
Documentation/rev-list-description.adoc
··· 26 26 means "list all the commits which are reachable from 'foo' or 'bar', but 27 27 not from 'baz'". 28 28 29 - A special notation "'<commit1>'..'<commit2>'" can be used as a 30 - short-hand for "^'<commit1>' '<commit2>'". For example, either of 29 + A special notation "`<commit1>..<commit2>`" can be used as a 30 + short-hand for "`^<commit1> <commit2>`". For example, either of 31 31 the following may be used interchangeably: 32 32 33 33 ifdef::git-rev-list[] ··· 43 43 ----------------------------------------------------------------------- 44 44 endif::git-log[] 45 45 46 - Another special notation is "'<commit1>'...'<commit2>'" which is useful 46 + Another special notation is "`<commit1>...<commit2>`" which is useful 47 47 for merges. The resulting set of commits is the symmetric difference 48 48 between the two operands. The following two commands are equivalent: 49 49
+195 -195
Documentation/rev-list-options.adoc
··· 6 6 limiting may be applied. 7 7 8 8 Using more options generally further limits the output (e.g. 9 - `--since=<date1>` limits to commits newer than `<date1>`, and using it 9 + `--since=<date1>` limits to commits newer than _<date1>_, and using it 10 10 with `--grep=<pattern>` further limits to commits whose log message 11 - has a line that matches `<pattern>`), unless otherwise noted. 11 + has a line that matches _<pattern>_), unless otherwise noted. 12 12 13 13 Note that these are applied before commit 14 14 ordering and formatting options, such as `--reverse`. 15 15 16 - -<number>:: 17 - -n <number>:: 18 - --max-count=<number>:: 19 - Limit the number of commits to output. 16 + `-<number>`:: 17 + `-n <number>`:: 18 + `--max-count=<number>`:: 19 + Limit the output to _<number>_ commits. 20 20 21 - --skip=<number>:: 22 - Skip 'number' commits before starting to show the commit output. 21 + `--skip=<number>`:: 22 + Skip _<number>_ commits before starting to show the commit output. 23 23 24 - --since=<date>:: 25 - --after=<date>:: 26 - Show commits more recent than a specific date. 24 + `--since=<date>`:: 25 + `--after=<date>`:: 26 + Show commits more recent than _<date>_. 27 27 28 - --since-as-filter=<date>:: 29 - Show all commits more recent than a specific date. This visits 28 + `--since-as-filter=<date>`:: 29 + Show all commits more recent than _<date>_. This visits 30 30 all commits in the range, rather than stopping at the first commit which 31 - is older than a specific date. 31 + is older than _<date>_. 32 32 33 - --until=<date>:: 34 - --before=<date>:: 35 - Show commits older than a specific date. 33 + `--until=<date>`:: 34 + `--before=<date>`:: 35 + Show commits older than _<date>_. 36 36 37 37 ifdef::git-rev-list[] 38 - --max-age=<timestamp>:: 39 - --min-age=<timestamp>:: 38 + `--max-age=<timestamp>`:: 39 + `--min-age=<timestamp>`:: 40 40 Limit the commits output to specified time range. 41 41 endif::git-rev-list[] 42 42 43 - --author=<pattern>:: 44 - --committer=<pattern>:: 43 + `--author=<pattern>`:: 44 + `--committer=<pattern>`:: 45 45 Limit the commits output to ones with author/committer 46 - header lines that match the specified pattern (regular 47 - expression). With more than one `--author=<pattern>`, 48 - commits whose author matches any of the given patterns are 46 + header lines that match the _<pattern>_ regular 47 + expression. With more than one `--author=<pattern>`, 48 + commits whose author matches any of the _<pattern>_ are 49 49 chosen (similarly for multiple `--committer=<pattern>`). 50 50 51 - --grep-reflog=<pattern>:: 51 + `--grep-reflog=<pattern>`:: 52 52 Limit the commits output to ones with reflog entries that 53 - match the specified pattern (regular expression). With 53 + match the _<pattern>_ regular expression. With 54 54 more than one `--grep-reflog`, commits whose reflog message 55 55 matches any of the given patterns are chosen. It is an 56 56 error to use this option unless `--walk-reflogs` is in use. 57 57 58 - --grep=<pattern>:: 58 + `--grep=<pattern>`:: 59 59 Limit the commits output to ones with a log message that 60 - matches the specified pattern (regular expression). With 60 + matches the _<pattern>_ regular expression. With 61 61 more than one `--grep=<pattern>`, commits whose message 62 - matches any of the given patterns are chosen (but see 62 + matches any of the _<pattern>_ are chosen (but see 63 63 `--all-match`). 64 64 ifndef::git-rev-list[] 65 65 + ··· 67 67 matched as if it were part of the log message. 68 68 endif::git-rev-list[] 69 69 70 - --all-match:: 70 + `--all-match`:: 71 71 Limit the commits output to ones that match all given `--grep`, 72 72 instead of ones that match at least one. 73 73 74 - --invert-grep:: 74 + `--invert-grep`:: 75 75 Limit the commits output to ones with a log message that do not 76 - match the pattern specified with `--grep=<pattern>`. 76 + match the _<pattern>_ specified with `--grep=<pattern>`. 77 77 78 - -i:: 79 - --regexp-ignore-case:: 78 + `-i`:: 79 + `--regexp-ignore-case`:: 80 80 Match the regular expression limiting patterns without regard to letter 81 81 case. 82 82 83 - --basic-regexp:: 83 + `--basic-regexp`:: 84 84 Consider the limiting patterns to be basic regular expressions; 85 85 this is the default. 86 86 87 - -E:: 88 - --extended-regexp:: 87 + `-E`:: 88 + `--extended-regexp`:: 89 89 Consider the limiting patterns to be extended regular expressions 90 90 instead of the default basic regular expressions. 91 91 92 - -F:: 93 - --fixed-strings:: 92 + `-F`:: 93 + `--fixed-strings`:: 94 94 Consider the limiting patterns to be fixed strings (don't interpret 95 95 pattern as a regular expression). 96 96 97 - -P:: 98 - --perl-regexp:: 97 + `-P`:: 98 + `--perl-regexp`:: 99 99 Consider the limiting patterns to be Perl-compatible regular 100 100 expressions. 101 101 + ··· 103 103 compile-time dependency. If Git wasn't compiled with support for them 104 104 providing this option will cause it to die. 105 105 106 - --remove-empty:: 106 + `--remove-empty`:: 107 107 Stop when a given path disappears from the tree. 108 108 109 - --merges:: 109 + `--merges`:: 110 110 Print only merge commits. This is exactly the same as `--min-parents=2`. 111 111 112 - --no-merges:: 112 + `--no-merges`:: 113 113 Do not print commits with more than one parent. This is 114 114 exactly the same as `--max-parents=1`. 115 115 116 - --min-parents=<number>:: 117 - --max-parents=<number>:: 118 - --no-min-parents:: 119 - --no-max-parents:: 116 + `--min-parents=<number>`:: 117 + `--max-parents=<number>`:: 118 + `--no-min-parents`:: 119 + `--no-max-parents`:: 120 120 Show only commits which have at least (or at most) that many parent 121 121 commits. In particular, `--max-parents=1` is the same as `--no-merges`, 122 122 `--min-parents=2` is the same as `--merges`. `--max-parents=0` ··· 126 126 again. Equivalent forms are `--min-parents=0` (any commit has 0 or more 127 127 parents) and `--max-parents=-1` (negative numbers denote no upper limit). 128 128 129 - --first-parent:: 129 + `--first-parent`:: 130 130 When finding commits to include, follow only the first 131 131 parent commit upon seeing a merge commit. This option 132 132 can give a better overview when viewing the evolution of ··· 141 141 to `first-parent`, see `--diff-merges=first-parent` for details. 142 142 endif::git-log[] 143 143 144 - --exclude-first-parent-only:: 144 + `--exclude-first-parent-only`:: 145 145 When finding commits to exclude (with a '{caret}'), follow only 146 146 the first parent commit upon seeing a merge commit. 147 147 This can be used to find the set of changes in a topic branch 148 148 from the point where it diverged from the remote branch, given 149 149 that arbitrary merges can be valid topic branch changes. 150 150 151 - --not:: 151 + `--not`:: 152 152 Reverses the meaning of the '{caret}' prefix (or lack thereof) 153 153 for all following revision specifiers, up to the next `--not`. 154 154 When used on the command line before --stdin, the revisions passed ··· 156 156 via standard input, the revisions passed on the command line will 157 157 not be affected by it. 158 158 159 - --all:: 159 + `--all`:: 160 160 Pretend as if all the refs in `refs/`, along with `HEAD`, are 161 - listed on the command line as '<commit>'. 161 + listed on the command line as _<commit>_. 162 162 163 - --branches[=<pattern>]:: 163 + `--branches[=<pattern>]`:: 164 164 Pretend as if all the refs in `refs/heads` are listed 165 - on the command line as '<commit>'. If '<pattern>' is given, limit 166 - branches to ones matching given shell glob. If pattern lacks '?', 165 + on the command line as _<commit>_. If _<pattern>_ is given, limit 166 + branches to ones matching given shell glob. If _<pattern>_ lacks '?', 167 167 '{asterisk}', or '[', '/{asterisk}' at the end is implied. 168 168 169 - --tags[=<pattern>]:: 169 + `--tags[=<pattern>]`:: 170 170 Pretend as if all the refs in `refs/tags` are listed 171 - on the command line as '<commit>'. If '<pattern>' is given, limit 171 + on the command line as _<commit>_. If _<pattern>_ is given, limit 172 172 tags to ones matching given shell glob. If pattern lacks '?', '{asterisk}', 173 173 or '[', '/{asterisk}' at the end is implied. 174 174 175 - --remotes[=<pattern>]:: 175 + `--remotes[=<pattern>]`:: 176 176 Pretend as if all the refs in `refs/remotes` are listed 177 - on the command line as '<commit>'. If '<pattern>' is given, limit 177 + on the command line as _<commit>_. If _<pattern>_ is given, limit 178 178 remote-tracking branches to ones matching given shell glob. 179 179 If pattern lacks '?', '{asterisk}', or '[', '/{asterisk}' at the end is implied. 180 180 181 - --glob=<glob-pattern>:: 182 - Pretend as if all the refs matching shell glob '<glob-pattern>' 183 - are listed on the command line as '<commit>'. Leading 'refs/', 181 + `--glob=<glob-pattern>`:: 182 + Pretend as if all the refs matching shell glob _<glob-pattern>_ 183 + are listed on the command line as _<commit>_. Leading 'refs/', 184 184 is automatically prepended if missing. If pattern lacks '?', '{asterisk}', 185 185 or '[', '/{asterisk}' at the end is implied. 186 186 187 - --exclude=<glob-pattern>:: 187 + `--exclude=<glob-pattern>`:: 188 188 189 - Do not include refs matching '<glob-pattern>' that the next `--all`, 189 + Do not include refs matching _<glob-pattern>_ that the next `--all`, 190 190 `--branches`, `--tags`, `--remotes`, or `--glob` would otherwise 191 191 consider. Repetitions of this option accumulate exclusion patterns 192 192 up to the next `--all`, `--branches`, `--tags`, `--remotes`, or ··· 199 199 or `--all`. If a trailing '/{asterisk}' is intended, it must be given 200 200 explicitly. 201 201 202 - --exclude-hidden=[fetch|receive|uploadpack]:: 202 + `--exclude-hidden=(fetch|receive|uploadpack)`:: 203 203 Do not include refs that would be hidden by `git-fetch`, 204 204 `git-receive-pack` or `git-upload-pack` by consulting the appropriate 205 205 `fetch.hideRefs`, `receive.hideRefs` or `uploadpack.hideRefs` ··· 207 207 linkgit:git-config[1]). This option affects the next pseudo-ref option 208 208 `--all` or `--glob` and is cleared after processing them. 209 209 210 - --reflog:: 210 + `--reflog`:: 211 211 Pretend as if all objects mentioned by reflogs are listed on the 212 - command line as `<commit>`. 212 + command line as _<commit>_. 213 213 214 - --alternate-refs:: 214 + `--alternate-refs`:: 215 215 Pretend as if all objects mentioned as ref tips of alternate 216 216 repositories were listed on the command line. An alternate 217 217 repository is any repository whose object directory is specified ··· 219 219 be modified by `core.alternateRefsCommand`, etc. See 220 220 linkgit:git-config[1]. 221 221 222 - --single-worktree:: 222 + `--single-worktree`:: 223 223 By default, all working trees will be examined by the 224 224 following options when there are more than one (see 225 225 linkgit:git-worktree[1]): `--all`, `--reflog` and ··· 227 227 This option forces them to examine the current working tree 228 228 only. 229 229 230 - --ignore-missing:: 230 + `--ignore-missing`:: 231 231 Upon seeing an invalid object name in the input, pretend as if 232 232 the bad input was not given. 233 233 234 234 ifndef::git-rev-list[] 235 - --bisect:: 235 + `--bisect`:: 236 236 Pretend as if the bad bisection ref `refs/bisect/bad` 237 237 was listed and as if it was followed by `--not` and the good 238 238 bisection refs `refs/bisect/good-*` on the command 239 239 line. 240 240 endif::git-rev-list[] 241 241 242 - --stdin:: 242 + `--stdin`:: 243 243 In addition to getting arguments from the command line, read 244 244 them from standard input as well. This accepts commits and 245 245 pseudo-options like `--all` and `--glob=`. When a `--` separator ··· 249 249 influence any subsequent command line arguments. 250 250 251 251 ifdef::git-rev-list[] 252 - --quiet:: 252 + `--quiet`:: 253 253 Don't print anything to standard output. This form 254 254 is primarily meant to allow the caller to 255 255 test the exit status to see if a range of objects is fully 256 256 connected (or not). It is faster than redirecting stdout 257 257 to `/dev/null` as the output does not have to be formatted. 258 258 259 - --disk-usage:: 260 - --disk-usage=human:: 259 + `--disk-usage`:: 260 + `--disk-usage=human`:: 261 261 Suppress normal output; instead, print the sum of the bytes used 262 262 for on-disk storage by the selected commits or objects. This is 263 263 equivalent to piping the output into `git cat-file ··· 269 269 in human-readable string(e.g. 12.24 Kib, 3.50 Mib). 270 270 endif::git-rev-list[] 271 271 272 - --cherry-mark:: 272 + `--cherry-mark`:: 273 273 Like `--cherry-pick` (see below) but mark equivalent commits 274 274 with `=` rather than omitting them, and inequivalent ones with `+`. 275 275 276 - --cherry-pick:: 276 + `--cherry-pick`:: 277 277 Omit any commit that introduces the same change as 278 278 another commit on the ``other side'' when the set of 279 279 commits are limited with symmetric difference. ··· 286 286 cherry-picked from branch A). With this option, such pairs of commits are 287 287 excluded from the output. 288 288 289 - --left-only:: 290 - --right-only:: 289 + `--left-only`:: 290 + `--right-only`:: 291 291 List only commits on the respective side of a symmetric difference, 292 292 i.e. only those which would be marked `<` resp. `>` by 293 293 `--left-right`. ··· 298 298 More precisely, `--cherry-pick --right-only --no-merges` gives the exact 299 299 list. 300 300 301 - --cherry:: 301 + `--cherry`:: 302 302 A synonym for `--right-only --cherry-mark --no-merges`; useful to 303 303 limit the output to the commits on our side and mark those that 304 304 have been applied to the other side of a forked history with 305 305 `git log --cherry upstream...mybranch`, similar to 306 306 `git cherry upstream mybranch`. 307 307 308 - -g:: 309 - --walk-reflogs:: 308 + `-g`:: 309 + `--walk-reflogs`:: 310 310 Instead of walking the commit ancestry chain, walk 311 311 reflog entries from the most recent one to older ones. 312 312 When this option is used you cannot specify commits to 313 - exclude (that is, '{caret}commit', 'commit1..commit2', 314 - and 'commit1\...commit2' notations cannot be used). 313 + exclude (that is, `^<commit>`, `<commit1>..<commit2>`, 314 + and `<commit1>...<commit2>` notations cannot be used). 315 315 + 316 316 With `--pretty` format other than `oneline` and `reference` (for obvious reasons), 317 317 this causes the output to have two extra lines of information ··· 340 340 + 341 341 Under `--pretty=reference`, this information will not be shown at all. 342 342 343 - --merge:: 343 + `--merge`:: 344 344 Show commits touching conflicted paths in the range `HEAD...<other>`, 345 345 where `<other>` is the first existing pseudoref in `MERGE_HEAD`, 346 346 `CHERRY_PICK_HEAD`, `REVERT_HEAD` or `REBASE_HEAD`. Only works 347 347 when the index has unmerged entries. This option can be used to show 348 348 relevant commits when resolving conflicts from a 3-way merge. 349 349 350 - --boundary:: 350 + `--boundary`:: 351 351 Output excluded boundary commits. Boundary commits are 352 352 prefixed with `-`. 353 353 354 354 ifdef::git-rev-list[] 355 - --use-bitmap-index:: 355 + `--use-bitmap-index`:: 356 356 357 357 Try to speed up the traversal using the pack bitmap index (if 358 358 one is available). Note that when traversing with `--objects`, 359 359 trees and blobs will not have their associated path printed. 360 360 361 - --progress=<header>:: 361 + `--progress=<header>`:: 362 362 Show progress reports on stderr as objects are considered. The 363 363 `<header>` text will be printed with each progress update. 364 364 365 - -z:: 365 + `-z`:: 366 366 Instead of being newline-delimited, each outputted object and its 367 367 accompanying metadata is delimited using NUL bytes. Output is printed 368 368 in the following form: ··· 397 397 398 398 The following options select the commits to be shown: 399 399 400 - <paths>:: 400 + `<paths>`:: 401 401 Commits modifying the given <paths> are selected. 402 402 403 - --simplify-by-decoration:: 403 + `--simplify-by-decoration`:: 404 404 Commits that are referred by some branch or tag are selected. 405 405 406 406 Note that extra commits can be shown to give a meaningful history. 407 407 408 408 The following options affect the way the simplification is performed: 409 409 410 - Default mode:: 410 + `Default mode`:: 411 411 Simplifies the history to the simplest history explaining the 412 412 final state of the tree. Simplest because it prunes some side 413 413 branches if the end result is the same (i.e. merging branches 414 414 with the same content) 415 415 416 - --show-pulls:: 416 + `--show-pulls`:: 417 417 Include all commits from the default mode, but also any merge 418 418 commits that are not TREESAME to the first parent but are 419 419 TREESAME to a later parent. This mode is helpful for showing 420 420 the merge commits that "first introduced" a change to a branch. 421 421 422 - --full-history:: 422 + `--full-history`:: 423 423 Same as the default mode, but does not prune some history. 424 424 425 - --dense:: 425 + `--dense`:: 426 426 Only the selected commits are shown, plus some to have a 427 427 meaningful history. 428 428 429 - --sparse:: 429 + `--sparse`:: 430 430 All commits in the simplified history are shown. 431 431 432 - --simplify-merges:: 432 + `--simplify-merges`:: 433 433 Additional option to `--full-history` to remove some needless 434 434 merges from the resulting history, as there are no selected 435 435 commits contributing to this merge. 436 436 437 - --ancestry-path[=<commit>]:: 438 - When given a range of commits to display (e.g. 'commit1..commit2' 439 - or 'commit2 {caret}commit1'), and a commit <commit> in that range, 437 + `--ancestry-path[=<commit>]`:: 438 + When given a range of commits to display (e.g. `<commit1>..<commit2>` 439 + or `<commit2> ^<commit1>`), and a commit _<commit>_ in that range, 440 440 only display commits in that range 441 - that are ancestors of <commit>, descendants of <commit>, or 442 - <commit> itself. If no commit is specified, use 'commit1' (the 443 - excluded part of the range) as <commit>. Can be passed multiple 441 + that are ancestors of _<commit>_, descendants of _<commit>_, or 442 + _<commit>_ itself. If no commit is specified, use _<commit1>_ (the 443 + excluded part of the range) as _<commit>_. Can be passed multiple 444 444 times; if so, a commit is included if it is any of the commits 445 445 given or if it is an ancestor or descendant of one of them. 446 446 447 447 A more detailed explanation follows. 448 448 449 - Suppose you specified `foo` as the <paths>. We shall call commits 449 + Suppose you specified `foo` as the _<paths>_. We shall call commits 450 450 that modify `foo` !TREESAME, and the rest TREESAME. (In a diff 451 451 filtered for `foo`, they look different and equal, respectively.) 452 452 ··· 466 466 each merge. The commits are: 467 467 468 468 * `I` is the initial commit, in which `foo` exists with contents 469 - ``asdf'', and a file `quux` exists with contents ``quux''. Initial 469 + `asdf`, and a file `quux` exists with contents `quux`. Initial 470 470 commits are compared to an empty tree, so `I` is !TREESAME. 471 471 472 - * In `A`, `foo` contains just ``foo''. 472 + * In `A`, `foo` contains just `foo`. 473 473 474 474 * `B` contains the same change as `A`. Its merge `M` is trivial and 475 475 hence TREESAME to all parents. 476 476 477 - * `C` does not change `foo`, but its merge `N` changes it to ``foobar'', 477 + * `C` does not change `foo`, but its merge `N` changes it to `foobar`, 478 478 so it is not TREESAME to any parent. 479 479 480 - * `D` sets `foo` to ``baz''. Its merge `O` combines the strings from 481 - `N` and `D` to ``foobarbaz''; i.e., it is not TREESAME to any parent. 480 + * `D` sets `foo` to `baz`. Its merge `O` combines the strings from 481 + `N` and `D` to `foobarbaz`; i.e., it is not TREESAME to any parent. 482 482 483 - * `E` changes `quux` to ``xyzzy'', and its merge `P` combines the 484 - strings to ``quux xyzzy''. `P` is TREESAME to `O`, but not to `E`. 483 + * `E` changes `quux` to `xyzzy`, and its merge `P` combines the 484 + strings to `quux xyzzy`. `P` is TREESAME to `O`, but not to `E`. 485 485 486 486 * `X` is an independent root commit that added a new file `side`, and `Y` 487 487 modified it. `Y` is TREESAME to `X`. Its merge `Q` added `side` to `P`, and ··· 517 517 not affect the commits selected in default mode, so we have shown the 518 518 parent lines. 519 519 520 - --full-history without parent rewriting:: 520 + `--full-history` without parent rewriting:: 521 521 This mode differs from the default in one point: always follow 522 522 all parents of a merge, even if it is TREESAME to one of them. 523 523 Even if more than one side of the merge has commits that are ··· 536 536 about the parent/child relationships between the commits, so we show 537 537 them disconnected. 538 538 539 - --full-history with parent rewriting:: 539 + `--full-history` with parent rewriting:: 540 540 Ordinary commits are only included if they are !TREESAME 541 541 (though this can be changed, see `--sparse` below). 542 542 + ··· 560 560 In addition to the above settings, you can change whether TREESAME 561 561 affects inclusion: 562 562 563 - --dense:: 563 + `--dense`:: 564 564 Commits that are walked are included if they are not TREESAME 565 565 to any parent. 566 566 567 - --sparse:: 567 + `--sparse`:: 568 568 All commits that are walked are included. 569 569 + 570 570 Note that without `--full-history`, this still simplifies merges: if 571 571 one of the parents is TREESAME, we follow only that one, so the other 572 572 sides of the merge are never walked. 573 573 574 - --simplify-merges:: 574 + `--simplify-merges`:: 575 575 First, build a history graph in the same way that 576 576 `--full-history` with parent rewriting does (see above). 577 577 + ··· 618 618 619 619 There is another simplification mode available: 620 620 621 - --ancestry-path[=<commit>]:: 621 + `--ancestry-path[=<commit>]`:: 622 622 Limit the displayed commits to those which are an ancestor of 623 - <commit>, or which are a descendant of <commit>, or are <commit> 623 + _<commit>_, or which are a descendant of _<commit>_, or are _<commit>_ 624 624 itself. 625 625 + 626 626 As an example use case, consider the following commit history: ··· 636 636 A regular 'D..M' computes the set of commits that are ancestors of `M`, 637 637 but excludes the ones that are ancestors of `D`. This is useful to see 638 638 what happened to the history leading to `M` since `D`, in the sense 639 - that ``what does `M` have that did not exist in `D`''. The result in this 639 + that "what does `M` have that did not exist in `D`". The result in this 640 640 example would be all the commits, except `A` and `B` (and `D` itself, 641 641 of course). 642 642 + 643 643 When we want to find out what commits in `M` are contaminated with the 644 644 bug introduced by `D` and need fixing, however, we might want to view 645 - only the subset of 'D..M' that are actually descendants of `D`, i.e. 645 + only the subset of `D..M` that are actually descendants of `D`, i.e. 646 646 excluding `C` and `K`. This is exactly what the `--ancestry-path` 647 - option does. Applied to the 'D..M' range, it results in: 647 + option does. Applied to the `D..M` range, it results in: 648 648 + 649 649 ----------------------------------------------------------------------- 650 650 E-------F ··· 655 655 ----------------------------------------------------------------------- 656 656 + 657 657 We can also use `--ancestry-path=D` instead of `--ancestry-path` which 658 - means the same thing when applied to the 'D..M' range but is just more 658 + means the same thing when applied to the `D..M` range but is just more 659 659 explicit. 660 660 + 661 661 If we instead are interested in a given topic within this range, and all ··· 770 770 the change `X` came to override the changes from `A` and `B` in its 771 771 commit message. 772 772 773 - --show-pulls:: 773 + `--show-pulls`:: 774 774 In addition to the commits shown in the default history, show 775 775 each merge commit that is not TREESAME to its first parent but 776 776 is TREESAME to a later parent. ··· 819 819 Bisection Helpers 820 820 ~~~~~~~~~~~~~~~~~ 821 821 822 - --bisect:: 822 + `--bisect`:: 823 823 Limit output to the one commit object which is roughly halfway between 824 824 included and excluded commits. Note that the bad bisection ref 825 825 `refs/bisect/bad` is added to the included commits (if it ··· 843 843 generate and test new 'midpoint's until the commit chain is of length 844 844 one. 845 845 846 - --bisect-vars:: 846 + `--bisect-vars`:: 847 847 This calculates the same as `--bisect`, except that refs in 848 848 `refs/bisect/` are not used, and except that this outputs 849 849 text ready to be eval'ed by the shell. These lines will assign the ··· 855 855 `bisect_bad`, and the number of commits we are bisecting right now to 856 856 `bisect_all`. 857 857 858 - --bisect-all:: 858 + `--bisect-all`:: 859 859 This outputs all the commit objects between the included and excluded 860 860 commits, ordered by their distance to the included and excluded 861 861 commits. Refs in `refs/bisect/` are not used. The farthest ··· 878 878 879 879 By default, the commits are shown in reverse chronological order. 880 880 881 - --date-order:: 881 + `--date-order`:: 882 882 Show no parents before all of its children are shown, but 883 883 otherwise show commits in the commit timestamp order. 884 884 885 - --author-date-order:: 885 + `--author-date-order`:: 886 886 Show no parents before all of its children are shown, but 887 887 otherwise show commits in the author timestamp order. 888 888 889 - --topo-order:: 889 + `--topo-order`:: 890 890 Show no parents before all of its children are shown, and 891 891 avoid showing commits on multiple lines of history 892 892 intermixed. ··· 910 910 avoid showing the commits from two parallel development track mixed 911 911 together. 912 912 913 - --reverse:: 914 - Output the commits chosen to be shown (see Commit Limiting 913 + `--reverse`:: 914 + Output the commits chosen to be shown (see 'Commit Limiting' 915 915 section above) in reverse order. Cannot be combined with 916 916 `--walk-reflogs`. 917 917 endif::git-shortlog[] ··· 923 923 These options are mostly targeted for packing of Git repositories. 924 924 925 925 ifdef::git-rev-list[] 926 - --objects:: 926 + `--objects`:: 927 927 Print the object IDs of any object referenced by the listed 928 - commits. `--objects foo ^bar` thus means ``send me 928 + commits. `--objects foo ^bar` thus means "send me 929 929 all object IDs which I need to download if I have the commit 930 - object _bar_ but not _foo_''. See also `--object-names` below. 930 + object `bar` but not `foo`". See also `--object-names` below. 931 931 932 - --in-commit-order:: 932 + `--in-commit-order`:: 933 933 Print tree and blob ids in order of the commits. The tree 934 934 and blob ids are printed after they are first referenced 935 935 by a commit. 936 936 937 - --objects-edge:: 937 + `--objects-edge`:: 938 938 Similar to `--objects`, but also print the IDs of excluded 939 - commits prefixed with a ``-'' character. This is used by 939 + commits prefixed with a "`-`" character. This is used by 940 940 linkgit:git-pack-objects[1] to build a ``thin'' pack, which records 941 941 objects in deltified form based on objects contained in these 942 942 excluded commits to reduce network traffic. 943 943 944 - --objects-edge-aggressive:: 944 + `--objects-edge-aggressive`:: 945 945 Similar to `--objects-edge`, but it tries harder to find excluded 946 946 commits at the cost of increased time. This is used instead of 947 947 `--objects-edge` to build ``thin'' packs for shallow repositories. 948 948 949 - --indexed-objects:: 949 + `--indexed-objects`:: 950 950 Pretend as if all trees and blobs used by the index are listed 951 951 on the command line. Note that you probably want to use 952 952 `--objects`, too. 953 953 954 - --unpacked:: 954 + `--unpacked`:: 955 955 Only useful with `--objects`; print the object IDs that are not 956 956 in packs. 957 957 958 - --object-names:: 958 + `--object-names`:: 959 959 Only useful with `--objects`; print the names of the object IDs 960 960 that are found. This is the default behavior. Note that the 961 961 "name" of each object is ambiguous, and mostly intended as a ··· 964 964 to remove newlines; and if an object would appear multiple times 965 965 with different names, only one name is shown. 966 966 967 - --no-object-names:: 967 + `--no-object-names`:: 968 968 Only useful with `--objects`; does not print the names of the object 969 969 IDs that are found. This inverts `--object-names`. This flag allows 970 970 the output to be more easily parsed by commands such as 971 971 linkgit:git-cat-file[1]. 972 972 973 - --filter=<filter-spec>:: 973 + `--filter=<filter-spec>`:: 974 974 Only useful with one of the `--objects*`; omits objects (usually 975 - blobs) from the list of printed objects. The '<filter-spec>' 975 + blobs) from the list of printed objects. The _<filter-spec>_ 976 976 may be one of the following: 977 977 + 978 - The form '--filter=blob:none' omits all blobs. 978 + The form `--filter=blob:none` omits all blobs. 979 979 + 980 - The form '--filter=blob:limit=<n>[kmg]' omits blobs of size at least n 981 - bytes or units. n may be zero. The suffixes k, m, and g can be used 982 - to name units in KiB, MiB, or GiB. For example, 'blob:limit=1k' 980 + The form `--filter=blob:limit=<n>[kmg]` omits blobs of size at least _<n>_ 981 + bytes or units. _<n>_ may be zero. The suffixes `k`, `m`, and `g` can be used 982 + to name units in KiB, MiB, or GiB. For example, `blob:limit=1k` 983 983 is the same as 'blob:limit=1024'. 984 984 + 985 - The form '--filter=object:type=(tag|commit|tree|blob)' omits all objects 985 + The form `--filter=object:type=(tag|commit|tree|blob)` omits all objects 986 986 which are not of the requested type. 987 987 + 988 - The form '--filter=sparse:oid=<blob-ish>' uses a sparse-checkout 989 - specification contained in the blob (or blob-expression) '<blob-ish>' 988 + The form `--filter=sparse:oid=<blob-ish>` uses a sparse-checkout 989 + specification contained in the blob (or blob-expression) _<blob-ish>_ 990 990 to omit blobs that would not be required for a sparse checkout on 991 991 the requested refs. 992 992 + 993 - The form '--filter=tree:<depth>' omits all blobs and trees whose depth 994 - from the root tree is >= <depth> (minimum depth if an object is located 995 - at multiple depths in the commits traversed). <depth>=0 will not include 993 + The form `--filter=tree:<depth>` omits all blobs and trees whose depth 994 + from the root tree is >= _<depth>_ (minimum depth if an object is located 995 + at multiple depths in the commits traversed). _<depth>_=0 will not include 996 996 any trees or blobs unless included explicitly in the command-line (or 997 - standard input when --stdin is used). <depth>=1 will include only the 997 + standard input when `--stdin` is used). _<depth>_=1 will include only the 998 998 tree and blobs which are referenced directly by a commit reachable from 999 - <commit> or an explicitly-given object. <depth>=2 is like <depth>=1 999 + _<commit>_ or an explicitly-given object. _<depth>_=2 is like <depth>=1 1000 1000 while also including trees and blobs one more level removed from an 1001 1001 explicitly-given commit or tree. 1002 1002 + 1003 - Note that the form '--filter=sparse:path=<path>' that wants to read 1003 + Note that the form `--filter=sparse:path=<path>` that wants to read 1004 1004 from an arbitrary path on the filesystem has been dropped for security 1005 1005 reasons. 1006 1006 + 1007 - Multiple '--filter=' flags can be specified to combine filters. Only 1007 + Multiple `--filter=` flags can be specified to combine filters. Only 1008 1008 objects which are accepted by every filter are included. 1009 1009 + 1010 - The form '--filter=combine:<filter1>+<filter2>+...<filterN>' can also be 1010 + The form `--filter=combine:<filter1>+<filter2>+...<filterN>` can also be 1011 1011 used to combined several filters, but this is harder than just repeating 1012 - the '--filter' flag and is usually not necessary. Filters are joined by 1012 + the `--filter` flag and is usually not necessary. Filters are joined by 1013 1013 '{plus}' and individual filters are %-encoded (i.e. URL-encoded). 1014 1014 Besides the '{plus}' and '%' characters, the following characters are 1015 1015 reserved and also must be encoded: `~!@#$^&*()[]{}\;",<>?`+&#39;&#96;+ ··· 1017 1017 space and newline. 1018 1018 + 1019 1019 Other arbitrary characters can also be encoded. For instance, 1020 - 'combine:tree:3+blob:none' and 'combine:tree%3A3+blob%3Anone' are 1020 + `combine:tree:3+blob:none` and `combine:tree%3A3+blob%3Anone` are 1021 1021 equivalent. 1022 1022 1023 - --no-filter:: 1023 + `--no-filter`:: 1024 1024 Turn off any previous `--filter=` argument. 1025 1025 1026 - --filter-provided-objects:: 1026 + `--filter-provided-objects`:: 1027 1027 Filter the list of explicitly provided objects, which would otherwise 1028 1028 always be printed even if they did not match any of the filters. Only 1029 1029 useful with `--filter=`. 1030 1030 1031 - --filter-print-omitted:: 1031 + `--filter-print-omitted`:: 1032 1032 Only useful with `--filter=`; prints a list of the objects omitted 1033 1033 by the filter. Object IDs are prefixed with a ``~'' character. 1034 1034 1035 - --missing=<missing-action>:: 1035 + `--missing=<missing-action>`:: 1036 1036 A debug option to help with future "partial clone" development. 1037 1037 This option specifies how missing objects are handled. 1038 1038 + 1039 - The form '--missing=error' requests that rev-list stop with an error if 1039 + The form `--missing=error` requests that rev-list stop with an error if 1040 1040 a missing object is encountered. This is the default action. 1041 1041 + 1042 - The form '--missing=allow-any' will allow object traversal to continue 1042 + The form `--missing=allow-any` will allow object traversal to continue 1043 1043 if a missing object is encountered. Missing objects will silently be 1044 1044 omitted from the results. 1045 1045 + 1046 - The form '--missing=allow-promisor' is like 'allow-any', but will only 1046 + The form `--missing=allow-promisor` is like `allow-any`, but will only 1047 1047 allow object traversal to continue for EXPECTED promisor missing objects. 1048 1048 Unexpected missing objects will raise an error. 1049 1049 + 1050 - The form '--missing=print' is like 'allow-any', but will also print a 1050 + The form `--missing=print` is like `allow-any`, but will also print a 1051 1051 list of the missing objects. Object IDs are prefixed with a ``?'' character. 1052 1052 + 1053 - The form '--missing=print-info' is like 'print', but will also print additional 1053 + The form `--missing=print-info` is like `print`, but will also print additional 1054 1054 information about the missing object inferred from its containing object. The 1055 1055 information is all printed on the same line with the missing object ID in the 1056 1056 form: `?<oid> [<token>=<value>]...`. The `<token>=<value>` pairs containing 1057 - additional information are separated from each other by a SP. The value is 1058 - encoded in a token specific fashion, but SP or LF contained in value are always 1057 + additional information are separated from each other by a _SP_. The value is 1058 + encoded in a token specific fashion, but _SP_ or _LF_ contained in value are always 1059 1059 expected to be represented in such a way that the resulting encoded value does 1060 1060 not have either of these two problematic bytes. Each `<token>=<value>` may be 1061 1061 one of the following: 1062 1062 + 1063 1063 -- 1064 1064 * The `path=<path>` shows the path of the missing object inferred from a 1065 - containing object. A path containing SP or special characters is enclosed in 1065 + containing object. A path containing _SP_ or special characters is enclosed in 1066 1066 double-quotes in the C style as needed. 1067 1067 + 1068 1068 * The `type=<type>` shows the type of the missing object inferred from a ··· 1073 1073 considered as missing too, and the traversal will ignore them. In case 1074 1074 we cannot get their Object ID though, an error will be raised. 1075 1075 1076 - --exclude-promisor-objects:: 1076 + `--exclude-promisor-objects`:: 1077 1077 (For internal use only.) Prefilter object traversal at 1078 1078 promisor boundary. This is used with partial clone. This is 1079 1079 stronger than `--missing=allow-promisor` because it limits the ··· 1081 1081 objects. 1082 1082 endif::git-rev-list[] 1083 1083 1084 - --no-walk[=(sorted|unsorted)]:: 1084 + `--no-walk[=(sorted|unsorted)]`:: 1085 1085 Only show the given commits, but do not traverse their ancestors. 1086 1086 This has no effect if a range is specified. If the argument 1087 1087 `unsorted` is given, the commits are shown in the order they were ··· 1090 1090 by commit time. 1091 1091 Cannot be combined with `--graph`. 1092 1092 1093 - --do-walk:: 1093 + `--do-walk`:: 1094 1094 Overrides a previous `--no-walk`. 1095 1095 endif::git-shortlog[] 1096 1096 ··· 1111 1111 1112 1112 include::pretty-options.adoc[] 1113 1113 1114 - --relative-date:: 1114 + `--relative-date`:: 1115 1115 Synonym for `--date=relative`. 1116 1116 1117 - --date=<format>:: 1117 + `--date=<format>`:: 1118 1118 Only takes effect for dates shown in human-readable format, such 1119 1119 as when using `--pretty`. `log.date` config variable sets a default 1120 1120 value for the log command's `--date` option. By default, dates ··· 1164 1164 1970). As with `--raw`, this is always in UTC and therefore `-local` 1165 1165 has no effect. 1166 1166 1167 - `--date=format:...` feeds the format `...` to your system `strftime`, 1168 - except for %s, %z, and %Z, which are handled internally. 1167 + `--date=format:<format>` feeds the _<format>_ to your system `strftime`, 1168 + except for `%s`, `%z`, and `%Z`, which are handled internally. 1169 1169 Use `--date=format:%c` to show the date in your system locale's 1170 - preferred format. See the `strftime` manual for a complete list of 1170 + preferred format. See the `strftime`(3) manual for a complete list of 1171 1171 format placeholders. When using `-local`, the correct syntax is 1172 - `--date=format-local:...`. 1172 + `--date=format-local:<format>`. 1173 1173 1174 1174 `--date=default` is the default format, and is based on ctime(3) 1175 1175 output. It shows a single line with three-letter day of the week, ··· 1179 1179 -- 1180 1180 1181 1181 ifdef::git-rev-list[] 1182 - --header:: 1182 + `--header`:: 1183 1183 Print the contents of the commit in raw-format; each record is 1184 1184 separated with a NUL character. 1185 1185 1186 - --no-commit-header:: 1186 + `--no-commit-header`:: 1187 1187 Suppress the header line containing "commit" and the object ID printed before 1188 1188 the specified format. This has no effect on the built-in formats; only custom 1189 1189 formats are affected. 1190 1190 1191 - --commit-header:: 1191 + `--commit-header`:: 1192 1192 Overrides a previous `--no-commit-header`. 1193 1193 endif::git-rev-list[] 1194 1194 1195 - --parents:: 1195 + `--parents`:: 1196 1196 Print also the parents of the commit (in the form "commit parent..."). 1197 1197 Also enables parent rewriting, see 'History Simplification' above. 1198 1198 1199 - --children:: 1199 + `--children`:: 1200 1200 Print also the children of the commit (in the form "commit child..."). 1201 1201 Also enables parent rewriting, see 'History Simplification' above. 1202 1202 1203 1203 ifdef::git-rev-list[] 1204 - --timestamp:: 1204 + `--timestamp`:: 1205 1205 Print the raw commit timestamp. 1206 1206 endif::git-rev-list[] 1207 1207 1208 - --left-right:: 1208 + `--left-right`:: 1209 1209 Mark which side of a symmetric difference a commit is reachable from. 1210 1210 Commits from the left side are prefixed with `<` and those from 1211 1211 the right with `>`. If combined with `--boundary`, those ··· 1234 1234 -xxxxxxx... 1st on a 1235 1235 ----------------------------------------------------------------------- 1236 1236 1237 - --graph:: 1237 + `--graph`:: 1238 1238 Draw a text-based graphical representation of the commit history 1239 1239 on the left hand side of the output. This may cause extra lines 1240 1240 to be printed in between commits, in order for the graph history ··· 1246 1246 This implies the `--topo-order` option by default, but the 1247 1247 `--date-order` option may also be specified. 1248 1248 1249 - --show-linear-break[=<barrier>]:: 1250 - When --graph is not used, all history branches are flattened 1249 + `--show-linear-break[=<barrier>]`:: 1250 + When `--graph` is not used, all history branches are flattened 1251 1251 which can make it hard to see that the two consecutive commits 1252 1252 do not belong to a linear branch. This option puts a barrier 1253 - in between them in that case. If `<barrier>` is specified, it 1253 + in between them in that case. If _<barrier>_ is specified, it 1254 1254 is the string that will be shown instead of the default one. 1255 1255 1256 1256 ifdef::git-rev-list[] 1257 - --count:: 1257 + `--count`:: 1258 1258 Print a number stating how many commits would have been 1259 1259 listed, and suppress all other output. When used together 1260 1260 with `--left-right`, instead print the counts for left and