]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/pretty-options.txt
CodingGuidelines: quote assigned value in 'local var=$val'
[thirdparty/git.git] / Documentation / pretty-options.txt
CommitLineData
efc39d6d
ŠN
1--pretty[=<format>]::
2--format=<format>::
331b51d2 3
1c911dc8 4 Pretty-print the contents of the commit logs in a given format,
331b51d2 5 where '<format>' can be one of 'oneline', 'short', 'medium',
1f0fc1db 6 'full', 'fuller', 'reference', 'email', 'raw', 'format:<string>'
b4a56a39
JH
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+
11See the "PRETTY FORMATS" section for some additional details for each
12format. When '=<format>' part is omitted, it defaults to 'medium'.
94c22a5e
CR
13+
14Note: you can specify the default pretty format in the repository
15configuration (see linkgit:git-config[1]).
331b51d2 16
13120fdc
JN
17--abbrev-commit::
18 Instead of showing the full 40-byte hexadecimal commit object
cda34e0d
JH
19 name, show a prefix that names the object uniquely.
20 "--abbrev=<n>" (which also modifies diff output, if it is displayed)
21 option can be used to specify the minimum length of the prefix.
13120fdc
JN
22+
23This should make "--pretty=oneline" a whole lot more readable for
24people using 80-column terminals.
25
0c47695a
JS
26--no-abbrev-commit::
27 Show the full 40-byte hexadecimal commit object name. This negates
ee22a292
SO
28 `--abbrev-commit`, either explicit or implied by other options such
29 as "--oneline". It also overrides the `log.abbrevCommit` variable.
0c47695a 30
de84accc
NS
31--oneline::
32 This is a shorthand for "--pretty=oneline --abbrev-commit"
33 used together.
34
e6604c35 35--encoding=<encoding>::
1e937708 36 Commit objects record the character encoding used for the log message
331b51d2
JN
37 in their encoding header; this option can be used to tell the
38 command to re-code the commit log message in the encoding
39 preferred by the user. For non plumbing commands this
e479c5f8
JK
40 defaults to UTF-8. Note that if an object claims to be encoded
41 in `X` and we are outputting in `X`, we will output the object
42 verbatim; this means that invalid sequences in the original
9e8fe7b1
JK
43 commit may be copied to the output. Likewise, if iconv(3) fails
44 to convert the commit, we will quietly output the original
45 object verbatim.
66b2ed09 46
fe37a9c5 47--expand-tabs=<n>::
7cc13c71 48--expand-tabs::
0893eec8 49--no-expand-tabs::
7cc13c71 50 Perform a tab expansion (replace each tab with enough spaces
0a4f051f 51 to fill to the next display column that is a multiple of '<n>')
7cc13c71 52 in the log message before showing it in the output.
fe37a9c5
JH
53 `--expand-tabs` is a short-hand for `--expand-tabs=8`, and
54 `--no-expand-tabs` is a short-hand for `--expand-tabs=0`,
55 which disables tab expansion.
0893eec8
JH
56+
57By default, tabs are expanded in pretty formats that indent the log
58message by 4 spaces (i.e. 'medium', which is the default, 'full',
fe37a9c5 59and 'fuller').
7cc13c71 60
2aea7a51 61ifndef::git-rev-list[]
26d94853 62--notes[=<ref>]::
66b2ed09
JH
63 Show the notes (see linkgit:git-notes[1]) that annotate the
64 commit, when showing the commit log message. This is the default
65 for `git log`, `git show` and `git whatchanged` commands when
a58088ab 66 there is no `--pretty`, `--format`, or `--oneline` option given
ab18b2c0
JH
67 on the command line.
68+
69By default, the notes shown are from the notes refs listed in the
ae9f6311 70`core.notesRef` and `notes.displayRef` variables (or corresponding
ab18b2c0
JH
71environment overrides). See linkgit:git-config[1] for more details.
72+
26d94853
DL
73With an optional '<ref>' argument, use the ref to find the notes
74to display. The ref can specify the full refname when it begins
e14c92e8 75with `refs/notes/`; when it begins with `notes/`, `refs/` and otherwise
3771d002 76`refs/notes/` is prefixed to form the full name of the ref.
894a9d33 77+
ab18b2c0
JH
78Multiple --notes options can be combined to control which notes are
79being displayed. Examples: "--notes=foo" will show only notes from
80"refs/notes/foo"; "--notes=foo --notes" will show both notes from
81"refs/notes/foo" and from the default notes ref(s).
894a9d33 82
ab18b2c0
JH
83--no-notes::
84 Do not show notes. This negates the above `--notes` option, by
85 resetting the list of notes refs from which notes are shown.
86 Options are parsed in the order given on the command line, so e.g.
87 "--notes --notes=foo --no-notes --notes=bar" will only show notes
88 from "refs/notes/bar".
89
2e0d30d9
KH
90--show-notes-by-default::
91 Show the default notes unless options for displaying specific
92 notes are given.
93
26d94853 94--show-notes[=<ref>]::
894a9d33 95--[no-]standard-notes::
ab18b2c0
JH
96 These options are deprecated. Use the above --notes/--no-notes
97 options instead.
2aea7a51 98endif::git-rev-list[]
f2fef7b5
SB
99
100--show-signature::
101 Check the validity of a signed commit object by passing the signature
102 to `gpg --verify` and show the output.