| Junio C Hamano | d2179ef | 2010-10-22 04:12:17 | [diff] [blame] | 1 | --pretty[=<format>]:: |
| 2 | --format=<format>:: |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 3 | |
| Junio C Hamano | a3770f9 | 2007-07-25 08:53:33 | [diff] [blame] | 4 | Pretty-print the contents of the commit logs in a given format, |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 5 | where '<format>' can be one of 'oneline', 'short', 'medium', |
| Junio C Hamano | b489685 | 2019-12-10 23:15:09 | [diff] [blame] | 6 | 'full', 'fuller', 'reference', 'email', 'raw', 'format:<string>' |
| Junio C Hamano | 6bb32e6 | 2015-02-17 22:11:26 | [diff] [blame] | 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 | + |
| 11 | See the "PRETTY FORMATS" section for some additional details for each |
| 12 | format. When '=<format>' part is omitted, it defaults to 'medium'. |
| Junio C Hamano | 86bcccc | 2008-03-08 09:33:55 | [diff] [blame] | 13 | + |
| 14 | Note: you can specify the default pretty format in the repository |
| 15 | configuration (see linkgit:git-config[1]). |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 16 | |
| Junio C Hamano | ee695f2 | 2007-06-21 00:35:36 | [diff] [blame] | 17 | --abbrev-commit:: |
| 18 | Instead of showing the full 40-byte hexadecimal commit object |
| Junio C Hamano | ee43d18 | 2020-11-11 22:10:41 | [diff] [blame] | 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. |
| Junio C Hamano | ee695f2 | 2007-06-21 00:35:36 | [diff] [blame] | 22 | + |
| 23 | This should make "--pretty=oneline" a whole lot more readable for |
| 24 | people using 80-column terminals. |
| 25 | |
| Junio C Hamano | f93530e | 2011-05-25 23:59:59 | [diff] [blame] | 26 | --no-abbrev-commit:: |
| 27 | Show the full 40-byte hexadecimal commit object name. This negates |
| Junio C Hamano | 558abd2 | 2020-09-03 20:22:34 | [diff] [blame] | 28 | `--abbrev-commit`, either explicit or implied by other options such |
| 29 | as "--oneline". It also overrides the `log.abbrevCommit` variable. |
| Junio C Hamano | f93530e | 2011-05-25 23:59:59 | [diff] [blame] | 30 | |
| Junio C Hamano | 0a23522 | 2009-03-06 08:21:09 | [diff] [blame] | 31 | --oneline:: |
| 32 | This is a shorthand for "--pretty=oneline --abbrev-commit" |
| 33 | used together. |
| 34 | |
| Junio C Hamano | c5bb3b3 | 2013-08-05 22:43:36 | [diff] [blame] | 35 | --encoding=<encoding>:: |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 36 | The commit objects record the encoding used for the log message |
| 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 |
| Junio C Hamano | 823eebb | 2015-07-10 22:29:34 | [diff] [blame] | 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 |
| 43 | commit may be copied to the output. |
| Junio C Hamano | 57827fb | 2010-01-23 03:02:50 | [diff] [blame] | 44 | |
| Junio C Hamano | 5996b67 | 2016-04-13 22:01:41 | [diff] [blame] | 45 | --expand-tabs=<n>:: |
| 46 | --expand-tabs:: |
| 47 | --no-expand-tabs:: |
| 48 | Perform a tab expansion (replace each tab with enough spaces |
| 49 | to fill to the next display column that is multiple of '<n>') |
| 50 | in the log message before showing it in the output. |
| 51 | `--expand-tabs` is a short-hand for `--expand-tabs=8`, and |
| 52 | `--no-expand-tabs` is a short-hand for `--expand-tabs=0`, |
| 53 | which disables tab expansion. |
| 54 | + |
| 55 | By default, tabs are expanded in pretty formats that indent the log |
| 56 | message by 4 spaces (i.e. 'medium', which is the default, 'full', |
| 57 | and 'fuller'). |
| 58 | |
| Junio C Hamano | 3891e25 | 2015-08-31 23:06:13 | [diff] [blame] | 59 | ifndef::git-rev-list[] |
| Junio C Hamano | b3f862c | 2019-12-05 22:22:00 | [diff] [blame] | 60 | --notes[=<ref>]:: |
| Junio C Hamano | 57827fb | 2010-01-23 03:02:50 | [diff] [blame] | 61 | Show the notes (see linkgit:git-notes[1]) that annotate the |
| 62 | commit, when showing the commit log message. This is the default |
| 63 | for `git log`, `git show` and `git whatchanged` commands when |
| Junio C Hamano | d75148a | 2014-04-08 19:48:38 | [diff] [blame] | 64 | there is no `--pretty`, `--format`, or `--oneline` option given |
| Junio C Hamano | 6003346 | 2011-05-03 00:48:43 | [diff] [blame] | 65 | on the command line. |
| Junio C Hamano | 3166736 | 2010-03-25 00:38:53 | [diff] [blame] | 66 | + |
| Junio C Hamano | 6003346 | 2011-05-03 00:48:43 | [diff] [blame] | 67 | By default, the notes shown are from the notes refs listed in the |
| Junio C Hamano | 042f214 | 2016-06-27 18:05:05 | [diff] [blame] | 68 | `core.notesRef` and `notes.displayRef` variables (or corresponding |
| Junio C Hamano | 6003346 | 2011-05-03 00:48:43 | [diff] [blame] | 69 | environment overrides). See linkgit:git-config[1] for more details. |
| 70 | + |
| Junio C Hamano | b3f862c | 2019-12-05 22:22:00 | [diff] [blame] | 71 | With an optional '<ref>' argument, use the ref to find the notes |
| 72 | to display. The ref can specify the full refname when it begins |
| Junio C Hamano | 1f7c4a5 | 2015-10-14 22:15:51 | [diff] [blame] | 73 | with `refs/notes/`; when it begins with `notes/`, `refs/` and otherwise |
| 74 | `refs/notes/` is prefixed to form a full name of the ref. |
| Junio C Hamano | 6003346 | 2011-05-03 00:48:43 | [diff] [blame] | 75 | + |
| 76 | Multiple --notes options can be combined to control which notes are |
| 77 | being displayed. Examples: "--notes=foo" will show only notes from |
| 78 | "refs/notes/foo"; "--notes=foo --notes" will show both notes from |
| 79 | "refs/notes/foo" and from the default notes ref(s). |
| Junio C Hamano | 3166736 | 2010-03-25 00:38:53 | [diff] [blame] | 80 | |
| Junio C Hamano | 6003346 | 2011-05-03 00:48:43 | [diff] [blame] | 81 | --no-notes:: |
| 82 | Do not show notes. This negates the above `--notes` option, by |
| 83 | resetting the list of notes refs from which notes are shown. |
| 84 | Options are parsed in the order given on the command line, so e.g. |
| 85 | "--notes --notes=foo --no-notes --notes=bar" will only show notes |
| 86 | from "refs/notes/bar". |
| 87 | |
| Junio C Hamano | b3f862c | 2019-12-05 22:22:00 | [diff] [blame] | 88 | --show-notes[=<ref>]:: |
| Junio C Hamano | 3166736 | 2010-03-25 00:38:53 | [diff] [blame] | 89 | --[no-]standard-notes:: |
| Junio C Hamano | 6003346 | 2011-05-03 00:48:43 | [diff] [blame] | 90 | These options are deprecated. Use the above --notes/--no-notes |
| 91 | options instead. |
| Junio C Hamano | 3891e25 | 2015-08-31 23:06:13 | [diff] [blame] | 92 | endif::git-rev-list[] |
| Junio C Hamano | 0acb1ae | 2012-09-24 21:28:13 | [diff] [blame] | 93 | |
| 94 | --show-signature:: |
| 95 | Check the validity of a signed commit object by passing the signature |
| 96 | to `gpg --verify` and show the output. |