| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" |
| 2 | "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> |
| 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 6 | <meta name="generator" content="AsciiDoc 8.2.5" /> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 7 | <style type="text/css"> |
| 8 | /* Debug borders */ |
| 9 | p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 { |
| 10 | /* |
| 11 | border: 1px solid red; |
| 12 | */ |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | margin: 1em 5% 1em 5%; |
| 17 | } |
| 18 | |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 19 | a { |
| 20 | color: blue; |
| 21 | text-decoration: underline; |
| 22 | } |
| 23 | a:visited { |
| 24 | color: fuchsia; |
| 25 | } |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 26 | |
| 27 | em { |
| 28 | font-style: italic; |
| 29 | } |
| 30 | |
| 31 | strong { |
| 32 | font-weight: bold; |
| 33 | } |
| 34 | |
| 35 | tt { |
| 36 | color: navy; |
| 37 | } |
| 38 | |
| 39 | h1, h2, h3, h4, h5, h6 { |
| 40 | color: #527bbd; |
| 41 | font-family: sans-serif; |
| 42 | margin-top: 1.2em; |
| 43 | margin-bottom: 0.5em; |
| 44 | line-height: 1.3; |
| 45 | } |
| 46 | |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 47 | h1, h2, h3 { |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 48 | border-bottom: 2px solid silver; |
| 49 | } |
| 50 | h2 { |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 51 | padding-top: 0.5em; |
| 52 | } |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 53 | h3 { |
| 54 | float: left; |
| 55 | } |
| 56 | h3 + * { |
| 57 | clear: left; |
| 58 | } |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 59 | |
| 60 | div.sectionbody { |
| 61 | font-family: serif; |
| 62 | margin-left: 0; |
| 63 | } |
| 64 | |
| 65 | hr { |
| 66 | border: 1px solid silver; |
| 67 | } |
| 68 | |
| 69 | p { |
| 70 | margin-top: 0.5em; |
| 71 | margin-bottom: 0.5em; |
| 72 | } |
| 73 | |
| 74 | pre { |
| 75 | padding: 0; |
| 76 | margin: 0; |
| 77 | } |
| 78 | |
| 79 | span#author { |
| 80 | color: #527bbd; |
| 81 | font-family: sans-serif; |
| 82 | font-weight: bold; |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 83 | font-size: 1.1em; |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 84 | } |
| 85 | span#email { |
| 86 | } |
| 87 | span#revision { |
| 88 | font-family: sans-serif; |
| 89 | } |
| 90 | |
| 91 | div#footer { |
| 92 | font-family: sans-serif; |
| 93 | font-size: small; |
| 94 | border-top: 2px solid silver; |
| 95 | padding-top: 0.5em; |
| 96 | margin-top: 4.0em; |
| 97 | } |
| 98 | div#footer-text { |
| 99 | float: left; |
| 100 | padding-bottom: 0.5em; |
| 101 | } |
| 102 | div#footer-badges { |
| 103 | float: right; |
| 104 | padding-bottom: 0.5em; |
| 105 | } |
| 106 | |
| 107 | div#preamble, |
| 108 | div.tableblock, div.imageblock, div.exampleblock, div.verseblock, |
| 109 | div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, |
| 110 | div.admonitionblock { |
| 111 | margin-right: 10%; |
| 112 | margin-top: 1.5em; |
| 113 | margin-bottom: 1.5em; |
| 114 | } |
| 115 | div.admonitionblock { |
| 116 | margin-top: 2.5em; |
| 117 | margin-bottom: 2.5em; |
| 118 | } |
| 119 | |
| 120 | div.content { /* Block element content. */ |
| 121 | padding: 0; |
| 122 | } |
| 123 | |
| 124 | /* Block element titles. */ |
| 125 | div.title, caption.title { |
| 126 | font-family: sans-serif; |
| 127 | font-weight: bold; |
| 128 | text-align: left; |
| 129 | margin-top: 1.0em; |
| 130 | margin-bottom: 0.5em; |
| 131 | } |
| 132 | div.title + * { |
| 133 | margin-top: 0; |
| 134 | } |
| 135 | |
| 136 | td div.title:first-child { |
| 137 | margin-top: 0.0em; |
| 138 | } |
| 139 | div.content div.title:first-child { |
| 140 | margin-top: 0.0em; |
| 141 | } |
| 142 | div.content + div.title { |
| 143 | margin-top: 0.0em; |
| 144 | } |
| 145 | |
| 146 | div.sidebarblock > div.content { |
| 147 | background: #ffffee; |
| 148 | border: 1px solid silver; |
| 149 | padding: 0.5em; |
| 150 | } |
| 151 | |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 152 | div.listingblock { |
| 153 | margin-right: 0%; |
| 154 | } |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 155 | div.listingblock > div.content { |
| 156 | border: 1px solid silver; |
| 157 | background: #f4f4f4; |
| 158 | padding: 0.5em; |
| 159 | } |
| 160 | |
| 161 | div.quoteblock > div.content { |
| 162 | padding-left: 2.0em; |
| 163 | } |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 164 | |
| 165 | div.attribution { |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 166 | text-align: right; |
| 167 | } |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 168 | div.verseblock + div.attribution { |
| 169 | text-align: left; |
| 170 | } |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 171 | |
| 172 | div.admonitionblock .icon { |
| 173 | vertical-align: top; |
| 174 | font-size: 1.1em; |
| 175 | font-weight: bold; |
| 176 | text-decoration: underline; |
| 177 | color: #527bbd; |
| 178 | padding-right: 0.5em; |
| 179 | } |
| 180 | div.admonitionblock td.content { |
| 181 | padding-left: 0.5em; |
| 182 | border-left: 2px solid silver; |
| 183 | } |
| 184 | |
| 185 | div.exampleblock > div.content { |
| 186 | border-left: 2px solid silver; |
| 187 | padding: 0.5em; |
| 188 | } |
| 189 | |
| 190 | div.verseblock div.content { |
| 191 | white-space: pre; |
| 192 | } |
| 193 | |
| 194 | div.imageblock div.content { padding-left: 0; } |
| 195 | div.imageblock img { border: 1px solid silver; } |
| 196 | span.image img { border-style: none; } |
| 197 | |
| 198 | dl { |
| 199 | margin-top: 0.8em; |
| 200 | margin-bottom: 0.8em; |
| 201 | } |
| 202 | dt { |
| 203 | margin-top: 0.5em; |
| 204 | margin-bottom: 0; |
| 205 | font-style: italic; |
| 206 | } |
| 207 | dd > *:first-child { |
| 208 | margin-top: 0; |
| 209 | } |
| 210 | |
| 211 | ul, ol { |
| 212 | list-style-position: outside; |
| 213 | } |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 214 | div.olist2 ol { |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 215 | list-style-type: lower-alpha; |
| 216 | } |
| 217 | |
| 218 | div.tableblock > table { |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 219 | border: 3px solid #527bbd; |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 220 | } |
| 221 | thead { |
| 222 | font-family: sans-serif; |
| 223 | font-weight: bold; |
| 224 | } |
| 225 | tfoot { |
| 226 | font-weight: bold; |
| 227 | } |
| 228 | |
| 229 | div.hlist { |
| 230 | margin-top: 0.8em; |
| 231 | margin-bottom: 0.8em; |
| 232 | } |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 233 | div.hlist td { |
| 234 | padding-bottom: 5px; |
| 235 | } |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 236 | td.hlist1 { |
| 237 | vertical-align: top; |
| 238 | font-style: italic; |
| 239 | padding-right: 0.8em; |
| 240 | } |
| 241 | td.hlist2 { |
| 242 | vertical-align: top; |
| 243 | } |
| 244 | |
| 245 | @media print { |
| 246 | div#footer-badges { display: none; } |
| 247 | } |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 248 | |
| 249 | div#toctitle { |
| 250 | color: #527bbd; |
| 251 | font-family: sans-serif; |
| 252 | font-size: 1.1em; |
| 253 | font-weight: bold; |
| 254 | margin-top: 1.0em; |
| 255 | margin-bottom: 0.1em; |
| 256 | } |
| 257 | |
| 258 | div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { |
| 259 | margin-top: 0; |
| 260 | margin-bottom: 0; |
| 261 | } |
| 262 | div.toclevel2 { |
| 263 | margin-left: 2em; |
| 264 | font-size: 0.9em; |
| 265 | } |
| 266 | div.toclevel3 { |
| 267 | margin-left: 4em; |
| 268 | font-size: 0.9em; |
| 269 | } |
| 270 | div.toclevel4 { |
| 271 | margin-left: 6em; |
| 272 | font-size: 0.9em; |
| 273 | } |
| 274 | include1::./stylesheets/xhtml11-manpage.css[] |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 275 | /* Workarounds for IE6's broken and incomplete CSS2. */ |
| 276 | |
| 277 | div.sidebar-content { |
| 278 | background: #ffffee; |
| 279 | border: 1px solid silver; |
| 280 | padding: 0.5em; |
| 281 | } |
| 282 | div.sidebar-title, div.image-title { |
| 283 | font-family: sans-serif; |
| 284 | font-weight: bold; |
| 285 | margin-top: 0.0em; |
| 286 | margin-bottom: 0.5em; |
| 287 | } |
| 288 | |
| 289 | div.listingblock div.content { |
| 290 | border: 1px solid silver; |
| 291 | background: #f4f4f4; |
| 292 | padding: 0.5em; |
| 293 | } |
| 294 | |
| 295 | div.quoteblock-content { |
| 296 | padding-left: 2.0em; |
| 297 | } |
| 298 | |
| 299 | div.exampleblock-content { |
| 300 | border-left: 2px solid silver; |
| 301 | padding-left: 0.5em; |
| 302 | } |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 303 | |
| 304 | /* IE6 sets dynamically generated links as visited. */ |
| 305 | div#toc a:visited { color: blue; } |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 306 | </style> |
| 307 | <title>git-rev-list(1)</title> |
| 308 | </head> |
| 309 | <body> |
| 310 | <div id="header"> |
| 311 | <h1> |
| 312 | git-rev-list(1) Manual Page |
| 313 | </h1> |
| 314 | <h2>NAME</h2> |
| 315 | <div class="sectionbody"> |
| 316 | <p>git-rev-list - |
| 317 | Lists commit objects in reverse chronological order |
| 318 | </p> |
| 319 | </div> |
| 320 | </div> |
| 321 | <h2>SYNOPSIS</h2> |
| 322 | <div class="sectionbody"> |
| Junio C Hamano | 235a91e | 2006-01-07 01:13:58 | [diff] [blame] | 323 | <div class="verseblock"> |
| 324 | <div class="content"><em>git-rev-list</em> [ --max-count=number ] |
| Junio C Hamano | 17bbaca | 2006-12-25 11:36:31 | [diff] [blame] | 325 | [ --skip=number ] |
| Junio C Hamano | 235a91e | 2006-01-07 01:13:58 | [diff] [blame] | 326 | [ --max-age=timestamp ] |
| 327 | [ --min-age=timestamp ] |
| 328 | [ --sparse ] |
| 329 | [ --no-merges ] |
| Junio C Hamano | 554da79 | 2007-12-27 03:29:58 | [diff] [blame] | 330 | [ --first-parent ] |
| Junio C Hamano | 9be1897 | 2006-01-28 08:54:57 | [diff] [blame] | 331 | [ --remove-empty ] |
| Junio C Hamano | ee695f2 | 2007-06-21 00:35:36 | [diff] [blame] | 332 | [ --full-history ] |
| Junio C Hamano | 872c568 | 2006-07-07 06:05:40 | [diff] [blame] | 333 | [ --not ] |
| Junio C Hamano | 235a91e | 2006-01-07 01:13:58 | [diff] [blame] | 334 | [ --all ] |
| Junio C Hamano | 40f54d3 | 2008-02-29 09:21:50 | [diff] [blame] | 335 | [ --branches ] |
| 336 | [ --tags ] |
| 337 | [ --remotes ] |
| Junio C Hamano | c9245d9 | 2006-09-06 09:35:46 | [diff] [blame] | 338 | [ --stdin ] |
| Junio C Hamano | 8c5802d | 2007-11-15 00:13:36 | [diff] [blame] | 339 | [ --quiet ] |
| Junio C Hamano | decf50e | 2006-03-05 10:51:14 | [diff] [blame] | 340 | [ --topo-order ] |
| Junio C Hamano | 235a91e | 2006-01-07 01:13:58 | [diff] [blame] | 341 | [ --parents ] |
| Junio C Hamano | ee695f2 | 2007-06-21 00:35:36 | [diff] [blame] | 342 | [ --timestamp ] |
| Junio C Hamano | 5678d69 | 2007-04-06 00:51:43 | [diff] [blame] | 343 | [ --left-right ] |
| Junio C Hamano | d9e0e5d | 2007-04-14 16:22:04 | [diff] [blame] | 344 | [ --cherry-pick ] |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 345 | [ --encoding[=<encoding>] ] |
| Junio C Hamano | 47c1e3c | 2006-09-25 04:45:55 | [diff] [blame] | 346 | [ --(author|committer|grep)=<pattern> ] |
| Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 347 | [ --regexp-ignore-case | -i ] |
| 348 | [ --extended-regexp | -E ] |
| 349 | [ --fixed-strings | -F ] |
| Junio C Hamano | 02f130b | 2007-07-14 08:26:56 | [diff] [blame] | 350 | [ --date={local|relative|default|iso|rfc|short} ] |
| Junio C Hamano | 5f32776 | 2006-03-02 09:14:51 | [diff] [blame] | 351 | [ [--objects | --objects-edge] [ --unpacked ] ] |
| Junio C Hamano | 235a91e | 2006-01-07 01:13:58 | [diff] [blame] | 352 | [ --pretty | --header ] |
| 353 | [ --bisect ] |
| Junio C Hamano | 20f64da | 2007-04-04 18:38:30 | [diff] [blame] | 354 | [ --bisect-vars ] |
| Junio C Hamano | 1974bf2 | 2007-10-31 05:57:20 | [diff] [blame] | 355 | [ --bisect-all ] |
| Junio C Hamano | 859f3b4 | 2006-08-04 10:04:30 | [diff] [blame] | 356 | [ --merge ] |
| Junio C Hamano | 053827f | 2007-02-14 07:23:58 | [diff] [blame] | 357 | [ --reverse ] |
| Junio C Hamano | db450ba | 2007-01-21 08:57:14 | [diff] [blame] | 358 | [ --walk-reflogs ] |
| Junio C Hamano | a196f6d | 2007-07-24 08:10:27 | [diff] [blame] | 359 | [ --no-walk ] [ --do-walk ] |
| Junio C Hamano | 235a91e | 2006-01-07 01:13:58 | [diff] [blame] | 360 | <commit>… [ -- <paths>… ]</div></div> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 361 | </div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 362 | <h2 id="_description">DESCRIPTION</h2> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 363 | <div class="sectionbody"> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 364 | <div class="para"><p>Lists commit objects in reverse chronological order starting at the |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 365 | given commit(s), taking ancestry relationship into account. This is |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 366 | useful to produce human-readable log output.</p></div> |
| 367 | <div class="para"><p>Commits which are stated with a preceding <em>^</em> cause listing to |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 368 | stop at that point. Their parents are implied. Thus the following |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 369 | command:</p></div> |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 370 | <div class="listingblock"> |
| 371 | <div class="content"> |
| Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 372 | <pre><tt> $ git rev-list foo bar ^baz</tt></pre> |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 373 | </div></div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 374 | <div class="para"><p>means "list all the commits which are included in <em>foo</em> and <em>bar</em>, but |
| 375 | not in <em>baz</em>".</p></div> |
| 376 | <div class="para"><p>A special notation "<em><commit1></em>..<em><commit2></em>" can be used as a |
| Junio C Hamano | 6926bef | 2007-06-16 09:54:05 | [diff] [blame] | 377 | short-hand for "^<em><commit1></em> <em><commit2></em>". For example, either of |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 378 | the following may be used interchangeably:</p></div> |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 379 | <div class="listingblock"> |
| 380 | <div class="content"> |
| Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 381 | <pre><tt> $ git rev-list origin..HEAD |
| 382 | $ git rev-list HEAD ^origin</tt></pre> |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 383 | </div></div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 384 | <div class="para"><p>Another special notation is "<em><commit1></em>…<em><commit2></em>" which is useful |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 385 | for merges. The resulting set of commits is the symmetric difference |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 386 | between the two operands. The following two commands are equivalent:</p></div> |
| Junio C Hamano | 872c568 | 2006-07-07 06:05:40 | [diff] [blame] | 387 | <div class="listingblock"> |
| 388 | <div class="content"> |
| Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 389 | <pre><tt> $ git rev-list A B --not $(git merge-base --all A B) |
| 390 | $ git rev-list A...B</tt></pre> |
| Junio C Hamano | 872c568 | 2006-07-07 06:05:40 | [diff] [blame] | 391 | </div></div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 392 | <div class="para"><p><em>git-rev-list</em> is a very essential git program, since it |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 393 | provides the ability to build and traverse commit ancestry graphs. For |
| 394 | this reason, it has a lot of different options that enables it to be |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 395 | used by commands as different as <em>git-bisect</em> and |
| 396 | <em>git-repack</em>.</p></div> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 397 | </div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 398 | <h2 id="_options">OPTIONS</h2> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 399 | <div class="sectionbody"> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 400 | <h3 id="_commit_formatting">Commit Formatting</h3><div style="clear:left"></div> |
| 401 | <div class="para"><p>Using these options, <a href="git-rev-list.html">git-rev-list(1)</a> will act similar to the |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 402 | more specialized family of commit log tools: <a href="git-log.html">git-log(1)</a>, |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 403 | <a href="git-show.html">git-show(1)</a>, and <a href="git-whatchanged.html">git-whatchanged(1)</a></p></div> |
| 404 | <div class="vlist"><dl> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 405 | <dt> |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 406 | --pretty[=<em><format></em>] |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 407 | </dt> |
| 408 | <dd> |
| 409 | <p> |
| Junio C Hamano | a3770f9 | 2007-07-25 08:53:33 | [diff] [blame] | 410 | Pretty-print the contents of the commit logs in a given format, |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 411 | where <em><format></em> can be one of <em>oneline</em>, <em>short</em>, <em>medium</em>, |
| 412 | <em>full</em>, <em>fuller</em>, <em>email</em>, <em>raw</em> and <em>format:<string></em>. |
| Junio C Hamano | a3770f9 | 2007-07-25 08:53:33 | [diff] [blame] | 413 | When omitted, the format defaults to <em>medium</em>. |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 414 | </p> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 415 | <div class="para"><p>Note: you can specify the default pretty format in the repository |
| 416 | configuration (see <a href="git-config.html">git-config(1)</a>).</p></div> |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 417 | </dd> |
| 418 | <dt> |
| Junio C Hamano | ee695f2 | 2007-06-21 00:35:36 | [diff] [blame] | 419 | --abbrev-commit |
| 420 | </dt> |
| 421 | <dd> |
| 422 | <p> |
| 423 | Instead of showing the full 40-byte hexadecimal commit object |
| 424 | name, show only handful hexdigits prefix. Non default number of |
| 425 | digits can be specified with "--abbrev=<n>" (which also modifies |
| 426 | diff output, if it is displayed). |
| 427 | </p> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 428 | <div class="para"><p>This should make "--pretty=oneline" a whole lot more readable for |
| 429 | people using 80-column terminals.</p></div> |
| Junio C Hamano | ee695f2 | 2007-06-21 00:35:36 | [diff] [blame] | 430 | </dd> |
| 431 | <dt> |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 432 | --encoding[=<encoding>] |
| 433 | </dt> |
| 434 | <dd> |
| 435 | <p> |
| 436 | The commit objects record the encoding used for the log message |
| 437 | in their encoding header; this option can be used to tell the |
| 438 | command to re-code the commit log message in the encoding |
| 439 | preferred by the user. For non plumbing commands this |
| 440 | defaults to UTF-8. |
| 441 | </p> |
| 442 | </dd> |
| 443 | <dt> |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 444 | --relative-date |
| 445 | </dt> |
| 446 | <dd> |
| 447 | <p> |
| Junio C Hamano | 45889b4 | 2007-04-26 07:20:04 | [diff] [blame] | 448 | Synonym for <tt>--date=relative</tt>. |
| 449 | </p> |
| 450 | </dd> |
| 451 | <dt> |
| Junio C Hamano | b713ff1 | 2008-05-24 01:12:30 | [diff] [blame] | 452 | --date={relative,local,default,iso,rfc,short} |
| Junio C Hamano | 45889b4 | 2007-04-26 07:20:04 | [diff] [blame] | 453 | </dt> |
| 454 | <dd> |
| 455 | <p> |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 456 | Only takes effect for dates shown in human-readable format, such |
| Junio C Hamano | b713ff1 | 2008-05-24 01:12:30 | [diff] [blame] | 457 | as when using "--pretty". <tt>log.date</tt> config variable sets a default |
| 458 | value for log command's --date option. |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 459 | </p> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 460 | <div class="para"><p><tt>--date=relative</tt> shows dates relative to the current time, |
| 461 | e.g. "2 hours ago".</p></div> |
| 462 | <div class="para"><p><tt>--date=local</tt> shows timestamps in user's local timezone.</p></div> |
| 463 | <div class="para"><p><tt>--date=iso</tt> (or <tt>--date=iso8601</tt>) shows timestamps in ISO 8601 format.</p></div> |
| 464 | <div class="para"><p><tt>--date=rfc</tt> (or <tt>--date=rfc2822</tt>) shows timestamps in RFC 2822 |
| 465 | format, often found in E-mail messages.</p></div> |
| 466 | <div class="para"><p><tt>--date=short</tt> shows only date but not time, in <tt>YYYY-MM-DD</tt> format.</p></div> |
| 467 | <div class="para"><p><tt>--date=default</tt> shows timestamps in the original timezone |
| 468 | (either committer's or author's).</p></div> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 469 | </dd> |
| 470 | <dt> |
| 471 | --header |
| 472 | </dt> |
| 473 | <dd> |
| 474 | <p> |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 475 | Print the contents of the commit in raw-format; each record is |
| 476 | separated with a NUL character. |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 477 | </p> |
| 478 | </dd> |
| 479 | <dt> |
| Junio C Hamano | 7ccb9fd | 2006-07-15 01:38:40 | [diff] [blame] | 480 | --parents |
| 481 | </dt> |
| 482 | <dd> |
| 483 | <p> |
| Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 484 | Print the parents of the commit. Also enables parent |
| 485 | rewriting, see <em>History Simplification</em> below. |
| Junio C Hamano | 7ccb9fd | 2006-07-15 01:38:40 | [diff] [blame] | 486 | </p> |
| 487 | </dd> |
| Junio C Hamano | 5678d69 | 2007-04-06 00:51:43 | [diff] [blame] | 488 | <dt> |
| Junio C Hamano | 46a38aa | 2008-07-14 03:13:27 | [diff] [blame] | 489 | --children |
| 490 | </dt> |
| 491 | <dd> |
| 492 | <p> |
| Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 493 | Print the children of the commit. Also enables parent |
| 494 | rewriting, see <em>History Simplification</em> below. |
| Junio C Hamano | 46a38aa | 2008-07-14 03:13:27 | [diff] [blame] | 495 | </p> |
| 496 | </dd> |
| 497 | <dt> |
| Junio C Hamano | ee695f2 | 2007-06-21 00:35:36 | [diff] [blame] | 498 | --timestamp |
| 499 | </dt> |
| 500 | <dd> |
| 501 | <p> |
| 502 | Print the raw commit timestamp. |
| 503 | </p> |
| 504 | </dd> |
| 505 | <dt> |
| Junio C Hamano | 5678d69 | 2007-04-06 00:51:43 | [diff] [blame] | 506 | --left-right |
| 507 | </dt> |
| 508 | <dd> |
| 509 | <p> |
| 510 | Mark which side of a symmetric diff a commit is reachable from. |
| 511 | Commits from the left side are prefixed with <tt><</tt> and those from |
| 512 | the right with <tt>></tt>. If combined with <tt>--boundary</tt>, those |
| 513 | commits are prefixed with <tt>-</tt>. |
| 514 | </p> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 515 | <div class="para"><p>For example, if you have this topology:</p></div> |
| Junio C Hamano | 5678d69 | 2007-04-06 00:51:43 | [diff] [blame] | 516 | <div class="listingblock"> |
| 517 | <div class="content"> |
| 518 | <pre><tt> y---b---b branch B |
| 519 | / \ / |
| 520 | / . |
| 521 | / / \ |
| 522 | o---x---a---a branch A</tt></pre> |
| 523 | </div></div> |
| Junio C Hamano | c96fb5a | 2008-08-12 06:59:38 | [diff] [blame] | 524 | <div class="para"><p>you would get an output like this:</p></div> |
| Junio C Hamano | 5678d69 | 2007-04-06 00:51:43 | [diff] [blame] | 525 | <div class="listingblock"> |
| 526 | <div class="content"> |
| 527 | <pre><tt> $ git rev-list --left-right --boundary --pretty=oneline A...B |
| 528 | |
| 529 | >bbbbbbb... 3rd on b |
| 530 | >bbbbbbb... 2nd on b |
| 531 | <aaaaaaa... 3rd on a |
| 532 | <aaaaaaa... 2nd on a |
| 533 | -yyyyyyy... 1st on b |
| 534 | -xxxxxxx... 1st on a</tt></pre> |
| 535 | </div></div> |
| 536 | </dd> |
| Junio C Hamano | feeb1be | 2008-05-22 00:53:35 | [diff] [blame] | 537 | <dt> |
| 538 | --graph |
| 539 | </dt> |
| 540 | <dd> |
| 541 | <p> |
| 542 | Draw a text-based graphical representation of the commit history |
| 543 | on the left hand side of the output. This may cause extra lines |
| 544 | to be printed in between commits, in order for the graph history |
| 545 | to be drawn properly. |
| 546 | </p> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 547 | <div class="para"><p>This implies the <em>--topo-order</em> option by default, but the |
| 548 | <em>--date-order</em> option may also be specified.</p></div> |
| Junio C Hamano | feeb1be | 2008-05-22 00:53:35 | [diff] [blame] | 549 | </dd> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 550 | </dl></div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 551 | <h3 id="_commit_limiting">Commit Limiting</h3><div style="clear:left"></div> |
| 552 | <div class="para"><p>Besides specifying a range of commits that should be listed using the |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 553 | special notations explained in the description, additional commit |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 554 | limiting may be applied.</p></div> |
| 555 | <div class="vlist"><dl> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 556 | <dt> |
| Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 557 | -n <em>number</em> |
| 558 | </dt> |
| 559 | <dt> |
| 560 | --max-count=<em>number</em> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 561 | </dt> |
| 562 | <dd> |
| 563 | <p> |
| 564 | Limit the number of commits output. |
| 565 | </p> |
| 566 | </dd> |
| 567 | <dt> |
| Junio C Hamano | 17bbaca | 2006-12-25 11:36:31 | [diff] [blame] | 568 | --skip=<em>number</em> |
| 569 | </dt> |
| 570 | <dd> |
| 571 | <p> |
| 572 | Skip <em>number</em> commits before starting to show the commit output. |
| 573 | </p> |
| 574 | </dd> |
| 575 | <dt> |
| Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 576 | --since=<em>date</em> |
| 577 | </dt> |
| 578 | <dt> |
| 579 | --after=<em>date</em> |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 580 | </dt> |
| 581 | <dd> |
| 582 | <p> |
| 583 | Show commits more recent than a specific date. |
| 584 | </p> |
| 585 | </dd> |
| 586 | <dt> |
| Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 587 | --until=<em>date</em> |
| 588 | </dt> |
| 589 | <dt> |
| 590 | --before=<em>date</em> |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 591 | </dt> |
| 592 | <dd> |
| 593 | <p> |
| 594 | Show commits older than a specific date. |
| 595 | </p> |
| 596 | </dd> |
| 597 | <dt> |
| Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 598 | --max-age=<em>timestamp</em> |
| 599 | </dt> |
| 600 | <dt> |
| 601 | --min-age=<em>timestamp</em> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 602 | </dt> |
| 603 | <dd> |
| 604 | <p> |
| 605 | Limit the commits output to specified time range. |
| 606 | </p> |
| 607 | </dd> |
| 608 | <dt> |
| Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 609 | --author=<em>pattern</em> |
| 610 | </dt> |
| 611 | <dt> |
| 612 | --committer=<em>pattern</em> |
| Junio C Hamano | 47c1e3c | 2006-09-25 04:45:55 | [diff] [blame] | 613 | </dt> |
| 614 | <dd> |
| 615 | <p> |
| 616 | Limit the commits output to ones with author/committer |
| Junio C Hamano | 75485c8 | 2007-05-19 04:20:33 | [diff] [blame] | 617 | header lines that match the specified pattern (regular expression). |
| Junio C Hamano | 47c1e3c | 2006-09-25 04:45:55 | [diff] [blame] | 618 | </p> |
| 619 | </dd> |
| 620 | <dt> |
| 621 | --grep=<em>pattern</em> |
| 622 | </dt> |
| 623 | <dd> |
| 624 | <p> |
| 625 | Limit the commits output to ones with log message that |
| Junio C Hamano | 75485c8 | 2007-05-19 04:20:33 | [diff] [blame] | 626 | matches the specified pattern (regular expression). |
| Junio C Hamano | 47c1e3c | 2006-09-25 04:45:55 | [diff] [blame] | 627 | </p> |
| 628 | </dd> |
| 629 | <dt> |
| Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 630 | -i |
| 631 | </dt> |
| 632 | <dt> |
| 633 | --regexp-ignore-case |
| Junio C Hamano | a5c02c5 | 2007-05-21 06:14:27 | [diff] [blame] | 634 | </dt> |
| 635 | <dd> |
| 636 | <p> |
| 637 | Match the regexp limiting patterns without regard to letters case. |
| 638 | </p> |
| 639 | </dd> |
| 640 | <dt> |
| Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 641 | -E |
| 642 | </dt> |
| 643 | <dt> |
| 644 | --extended-regexp |
| Junio C Hamano | a5c02c5 | 2007-05-21 06:14:27 | [diff] [blame] | 645 | </dt> |
| 646 | <dd> |
| 647 | <p> |
| 648 | Consider the limiting patterns to be extended regular expressions |
| 649 | instead of the default basic regular expressions. |
| 650 | </p> |
| 651 | </dd> |
| 652 | <dt> |
| Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 653 | -F |
| 654 | </dt> |
| 655 | <dt> |
| 656 | --fixed-strings |
| Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 657 | </dt> |
| 658 | <dd> |
| 659 | <p> |
| 660 | Consider the limiting patterns to be fixed strings (don't interpret |
| 661 | pattern as a regular expression). |
| 662 | </p> |
| 663 | </dd> |
| 664 | <dt> |
| Junio C Hamano | 9be1897 | 2006-01-28 08:54:57 | [diff] [blame] | 665 | --remove-empty |
| 666 | </dt> |
| 667 | <dd> |
| 668 | <p> |
| 669 | Stop when a given path disappears from the tree. |
| 670 | </p> |
| 671 | </dd> |
| 672 | <dt> |
| Junio C Hamano | 7ccb9fd | 2006-07-15 01:38:40 | [diff] [blame] | 673 | --no-merges |
| 674 | </dt> |
| 675 | <dd> |
| 676 | <p> |
| 677 | Do not print commits with more than one parent. |
| 678 | </p> |
| 679 | </dd> |
| 680 | <dt> |
| Junio C Hamano | 554da79 | 2007-12-27 03:29:58 | [diff] [blame] | 681 | --first-parent |
| 682 | </dt> |
| 683 | <dd> |
| 684 | <p> |
| 685 | Follow only the first parent commit upon seeing a merge |
| 686 | commit. This option can give a better overview when |
| 687 | viewing the evolution of a particular topic branch, |
| 688 | because merges into a topic branch tend to be only about |
| 689 | adjusting to updated upstream from time to time, and |
| 690 | this option allows you to ignore the individual commits |
| 691 | brought in to your history by such a merge. |
| 692 | </p> |
| 693 | </dd> |
| 694 | <dt> |
| Junio C Hamano | 872c568 | 2006-07-07 06:05:40 | [diff] [blame] | 695 | --not |
| 696 | </dt> |
| 697 | <dd> |
| 698 | <p> |
| Junio C Hamano | 6926bef | 2007-06-16 09:54:05 | [diff] [blame] | 699 | Reverses the meaning of the <em>^</em> prefix (or lack thereof) |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 700 | for all following revision specifiers, up to the next <em>--not</em>. |
| Junio C Hamano | 872c568 | 2006-07-07 06:05:40 | [diff] [blame] | 701 | </p> |
| 702 | </dd> |
| 703 | <dt> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 704 | --all |
| 705 | </dt> |
| 706 | <dd> |
| 707 | <p> |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 708 | Pretend as if all the refs in <tt>$GIT_DIR/refs/</tt> are listed on the |
| 709 | command line as <em><commit></em>. |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 710 | </p> |
| 711 | </dd> |
| Junio C Hamano | 859f3b4 | 2006-08-04 10:04:30 | [diff] [blame] | 712 | <dt> |
| Junio C Hamano | c9245d9 | 2006-09-06 09:35:46 | [diff] [blame] | 713 | --stdin |
| 714 | </dt> |
| 715 | <dd> |
| 716 | <p> |
| 717 | In addition to the <em><commit></em> listed on the command |
| 718 | line, read them from the standard input. |
| 719 | </p> |
| 720 | </dd> |
| 721 | <dt> |
| Junio C Hamano | 8c5802d | 2007-11-15 00:13:36 | [diff] [blame] | 722 | --quiet |
| 723 | </dt> |
| 724 | <dd> |
| 725 | <p> |
| Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 726 | Don't print anything to standard output. This form |
| 727 | is primarily meant to allow the caller to |
| Junio C Hamano | 8c5802d | 2007-11-15 00:13:36 | [diff] [blame] | 728 | test the exit status to see if a range of objects is fully |
| 729 | connected (or not). It is faster than redirecting stdout |
| 730 | to /dev/null as the output does not have to be formatted. |
| 731 | </p> |
| 732 | </dd> |
| 733 | <dt> |
| Junio C Hamano | d9e0e5d | 2007-04-14 16:22:04 | [diff] [blame] | 734 | --cherry-pick |
| 735 | </dt> |
| 736 | <dd> |
| 737 | <p> |
| 738 | Omit any commit that introduces the same change as |
| 739 | another commit on the "other side" when the set of |
| 740 | commits are limited with symmetric difference.<br /> |
| 741 | For example, if you have two branches, <tt>A</tt> and <tt>B</tt>, a usual way |
| 742 | to list all commits on only one side of them is with |
| 743 | <tt>--left-right</tt>, like the example above in the description of |
| 744 | that option. It however shows the commits that were cherry-picked |
| 745 | from the other branch (for example, "3rd on b" may be cherry-picked |
| 746 | from branch A). With this option, such pairs of commits are |
| 747 | excluded from the output. |
| 748 | </p> |
| 749 | </dd> |
| 750 | <dt> |
| Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 751 | -g |
| 752 | </dt> |
| 753 | <dt> |
| 754 | --walk-reflogs |
| Junio C Hamano | db450ba | 2007-01-21 08:57:14 | [diff] [blame] | 755 | </dt> |
| 756 | <dd> |
| 757 | <p> |
| 758 | Instead of walking the commit ancestry chain, walk |
| 759 | reflog entries from the most recent one to older ones. |
| 760 | When this option is used you cannot specify commits to |
| Junio C Hamano | 6926bef | 2007-06-16 09:54:05 | [diff] [blame] | 761 | exclude (that is, <em>^commit</em>, <em>commit1..commit2</em>, |
| Junio C Hamano | db450ba | 2007-01-21 08:57:14 | [diff] [blame] | 762 | nor <em>commit1…commit2</em> notations cannot be used).<br /> |
| 763 | With <em>--pretty</em> format other than oneline (for obvious reasons), |
| 764 | this causes the output to have two extra lines of information |
| Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 765 | taken from the reflog. By default, <em>commit@{Nth}</em> notation is |
| Junio C Hamano | db450ba | 2007-01-21 08:57:14 | [diff] [blame] | 766 | used in the output. When the starting commit is specified as |
| Junio C Hamano | 1d36888 | 2008-08-11 22:03:10 | [diff] [blame] | 767 | <em>commit@{now}</em>, output also uses <em>commit@{timestamp}</em> notation |
| Junio C Hamano | db450ba | 2007-01-21 08:57:14 | [diff] [blame] | 768 | instead. Under <em>--pretty=oneline</em>, the commit message is |
| Junio C Hamano | bdebabb | 2007-08-23 00:25:09 | [diff] [blame] | 769 | prefixed with this information on the same line. |
| Junio C Hamano | 1d36888 | 2008-08-11 22:03:10 | [diff] [blame] | 770 | This option cannot be combined with <em>--reverse</em>. |
| 771 | See also <a href="git-reflog.html">git-reflog(1)</a>. |
| Junio C Hamano | db450ba | 2007-01-21 08:57:14 | [diff] [blame] | 772 | </p> |
| 773 | </dd> |
| 774 | <dt> |
| Junio C Hamano | 859f3b4 | 2006-08-04 10:04:30 | [diff] [blame] | 775 | --merge |
| 776 | </dt> |
| 777 | <dd> |
| 778 | <p> |
| 779 | After a failed merge, show refs that touch files having a |
| 780 | conflict and don't exist on all heads to merge. |
| 781 | </p> |
| 782 | </dd> |
| Junio C Hamano | a0778c9 | 2006-08-29 04:03:11 | [diff] [blame] | 783 | <dt> |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 784 | --boundary |
| Junio C Hamano | a0778c9 | 2006-08-29 04:03:11 | [diff] [blame] | 785 | </dt> |
| 786 | <dd> |
| 787 | <p> |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 788 | Output uninteresting commits at the boundary, which are usually |
| 789 | not shown. |
| 790 | </p> |
| 791 | </dd> |
| Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 792 | </dl></div> |
| 793 | <h3 id="_history_simplification">History Simplification</h3><div style="clear:left"></div> |
| 794 | <div class="para"><p>When optional paths are given, <em>git-rev-list</em> simplifies commits with |
| 795 | various strategies, according to the options you have selected.</p></div> |
| 796 | <div class="para"><p>Suppose you specified <tt>foo</tt> as the <paths>. We shall call commits |
| 797 | that modify <tt>foo</tt> !TREESAME, and the rest TREESAME. (In a diff |
| 798 | filtered for <tt>foo</tt>, they look different and equal, respectively.)</p></div> |
| 799 | <div class="para"><p>In the following, we will always refer to the same example history to |
| 800 | illustrate the differences between simplification settings. We assume |
| 801 | that you are filtering for a file <tt>foo</tt> in this commit graph:</p></div> |
| 802 | <div class="listingblock"> |
| 803 | <div class="content"> |
| 804 | <pre><tt> .-A---M---N---O---P |
| 805 | / / / / / |
| 806 | I B C D E |
| 807 | \ / / / / |
| 808 | `-------------'</tt></pre> |
| 809 | </div></div> |
| 810 | <div class="para"><p>The horizontal line of history A--P is taken to be the first parent of |
| 811 | each merge. The commits are:</p></div> |
| 812 | <div class="ilist"><ul> |
| 813 | <li> |
| 814 | <p> |
| 815 | <tt>I</tt> is the initial commit, in which <tt>foo</tt> exists with contents |
| 816 | "asdf", and a file <tt>quux</tt> exists with contents "quux". Initial |
| 817 | commits are compared to an empty tree, so <tt>I</tt> is !TREESAME. |
| 818 | </p> |
| 819 | </li> |
| 820 | <li> |
| 821 | <p> |
| 822 | In <tt>A</tt>, <tt>foo</tt> contains just "foo". |
| 823 | </p> |
| 824 | </li> |
| 825 | <li> |
| 826 | <p> |
| 827 | <tt>B</tt> contains the same change as <tt>A</tt>. Its merge <tt>M</tt> is trivial and |
| 828 | hence TREESAME to all parents. |
| 829 | </p> |
| 830 | </li> |
| 831 | <li> |
| 832 | <p> |
| 833 | <tt>C</tt> does not change <tt>foo</tt>, but its merge <tt>N</tt> changes it to "foobar", |
| 834 | so it is not TREESAME to any parent. |
| 835 | </p> |
| 836 | </li> |
| 837 | <li> |
| 838 | <p> |
| 839 | <tt>D</tt> sets <tt>foo</tt> to "baz". Its merge <tt>O</tt> combines the strings from |
| 840 | <tt>N</tt> and <tt>D</tt> to "foobarbaz"; i.e., it is not TREESAME to any parent. |
| 841 | </p> |
| 842 | </li> |
| 843 | <li> |
| 844 | <p> |
| 845 | <tt>E</tt> changes <tt>quux</tt> to "xyzzy", and its merge <tt>P</tt> combines the |
| 846 | strings to "quux xyzzy". Despite appearing interesting, <tt>P</tt> is |
| 847 | TREESAME to all parents. |
| 848 | </p> |
| 849 | </li> |
| 850 | </ul></div> |
| 851 | <div class="para"><p><em>rev-list</em> walks backwards through history, including or excluding |
| 852 | commits based on whether <em>--full-history</em> and/or parent rewriting |
| 853 | (via <em>--parents</em> or <em>--children</em>) are used. The following settings |
| 854 | are available.</p></div> |
| 855 | <div class="vlist"><dl> |
| 856 | <dt> |
| 857 | Default mode |
| 858 | </dt> |
| 859 | <dd> |
| 860 | <p> |
| 861 | Commits are included if they are not TREESAME to any parent |
| 862 | (though this can be changed, see <em>--sparse</em> below). If the |
| 863 | commit was a merge, and it was TREESAME to one parent, follow |
| 864 | only that parent. (Even if there are several TREESAME |
| 865 | parents, follow only one of them.) Otherwise, follow all |
| 866 | parents. |
| 867 | </p> |
| 868 | <div class="para"><p>This results in:</p></div> |
| 869 | <div class="listingblock"> |
| 870 | <div class="content"> |
| 871 | <pre><tt> .-A---N---O |
| 872 | / / |
| 873 | I---------D</tt></pre> |
| 874 | </div></div> |
| 875 | <div class="para"><p>Note how the rule to only follow the TREESAME parent, if one is |
| 876 | available, removed <tt>B</tt> from consideration entirely. <tt>C</tt> was |
| 877 | considered via <tt>N</tt>, but is TREESAME. Root commits are compared to an |
| 878 | empty tree, so <tt>I</tt> is !TREESAME.</p></div> |
| 879 | <div class="para"><p>Parent/child relations are only visible with --parents, but that does |
| 880 | not affect the commits selected in default mode, so we have shown the |
| 881 | parent lines.</p></div> |
| 882 | </dd> |
| 883 | <dt> |
| 884 | --full-history without parent rewriting |
| 885 | </dt> |
| 886 | <dd> |
| 887 | <p> |
| 888 | This mode differs from the default in one point: always follow |
| 889 | all parents of a merge, even if it is TREESAME to one of them. |
| 890 | Even if more than one side of the merge has commits that are |
| 891 | included, this does not imply that the merge itself is! In |
| 892 | the example, we get |
| 893 | </p> |
| 894 | <div class="listingblock"> |
| 895 | <div class="content"> |
| 896 | <pre><tt> I A B N D O</tt></pre> |
| 897 | </div></div> |
| 898 | <div class="para"><p><tt>P</tt> and <tt>M</tt> were excluded because they are TREESAME to a parent. <tt>E</tt>, |
| 899 | <tt>C</tt> and <tt>B</tt> were all walked, but only <tt>B</tt> was !TREESAME, so the others |
| 900 | do not appear.</p></div> |
| 901 | <div class="para"><p>Note that without parent rewriting, it is not really possible to talk |
| 902 | about the parent/child relationships between the commits, so we show |
| 903 | them disconnected.</p></div> |
| 904 | </dd> |
| 905 | <dt> |
| 906 | --full-history with parent rewriting |
| 907 | </dt> |
| 908 | <dd> |
| 909 | <p> |
| 910 | Ordinary commits are only included if they are !TREESAME |
| 911 | (though this can be changed, see <em>--sparse</em> below). |
| 912 | </p> |
| 913 | <div class="para"><p>Merges are always included. However, their parent list is rewritten: |
| 914 | Along each parent, prune away commits that are not included |
| 915 | themselves. This results in</p></div> |
| 916 | <div class="listingblock"> |
| 917 | <div class="content"> |
| 918 | <pre><tt> .-A---M---N---O---P |
| 919 | / / / / / |
| 920 | I B / D / |
| 921 | \ / / / / |
| 922 | `-------------'</tt></pre> |
| 923 | </div></div> |
| 924 | <div class="para"><p>Compare to <em>--full-history</em> without rewriting above. Note that <tt>E</tt> |
| 925 | was pruned away because it is TREESAME, but the parent list of P was |
| 926 | rewritten to contain <tt>E</tt>'s parent <tt>I</tt>. The same happened for <tt>C</tt> and |
| 927 | <tt>N</tt>. Note also that <tt>P</tt> was included despite being TREESAME.</p></div> |
| 928 | </dd> |
| 929 | </dl></div> |
| 930 | <div class="para"><p>In addition to the above settings, you can change whether TREESAME |
| 931 | affects inclusion:</p></div> |
| 932 | <div class="vlist"><dl> |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 933 | <dt> |
| Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 934 | --dense |
| 935 | </dt> |
| Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 936 | <dd> |
| 937 | <p> |
| 938 | Commits that are walked are included if they are not TREESAME |
| 939 | to any parent. |
| 940 | </p> |
| 941 | </dd> |
| Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 942 | <dt> |
| 943 | --sparse |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 944 | </dt> |
| 945 | <dd> |
| 946 | <p> |
| Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 947 | All commits that are walked are included. |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 948 | </p> |
| Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 949 | <div class="para"><p>Note that without <em>--full-history</em>, this still simplifies merges: if |
| 950 | one of the parents is TREESAME, we follow only that one, so the other |
| 951 | sides of the merge are never walked.</p></div> |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 952 | </dd> |
| Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 953 | </dl></div> |
| Junio C Hamano | a2f4662 | 2008-09-03 05:20:31 | [diff] [blame] | 954 | <div class="para"><p>Finally, there is a fourth simplification mode available:</p></div> |
| 955 | <div class="vlist"><dl> |
| 956 | <dt> |
| 957 | --simplify-merges |
| 958 | </dt> |
| 959 | <dd> |
| 960 | <p> |
| 961 | First, build a history graph in the same way that |
| 962 | <em>--full-history</em> with parent rewriting does (see above). |
| 963 | </p> |
| 964 | <div class="para"><p>Then simplify each commit <tt>C</tt> to its replacement <tt>C'</tt> in the final |
| 965 | history according to the following rules:</p></div> |
| 966 | <div class="ilist"><ul> |
| 967 | <li> |
| 968 | <p> |
| 969 | Set <tt>C'</tt> to <tt>C</tt>.<br /> |
| 970 | </p> |
| 971 | </li> |
| 972 | <li> |
| 973 | <p> |
| 974 | Replace each parent <tt>P</tt> of <tt>C'</tt> with its simplification <tt>P'</tt>. In |
| 975 | the process, drop parents that are ancestors of other parents, and |
| 976 | remove duplicates.<br /> |
| 977 | </p> |
| 978 | </li> |
| 979 | <li> |
| 980 | <p> |
| 981 | If after this parent rewriting, <tt>C'</tt> is a root or merge commit (has |
| 982 | zero or >1 parents), a boundary commit, or !TREESAME, it remains. |
| 983 | Otherwise, it is replaced with its only parent. |
| 984 | </p> |
| 985 | </li> |
| 986 | </ul></div> |
| 987 | <div class="para"><p>The effect of this is best shown by way of comparing to |
| 988 | <em>--full-history</em> with parent rewriting. The example turns into:</p></div> |
| 989 | <div class="listingblock"> |
| 990 | <div class="content"> |
| 991 | <pre><tt> .-A---M---N---O |
| 992 | / / / |
| 993 | I B D |
| 994 | \ / / |
| 995 | `---------'</tt></pre> |
| 996 | </div></div> |
| 997 | <div class="para"><p>Note the major differences in <tt>N</tt> and <tt>P</tt> over <em>--full-history</em>:</p></div> |
| 998 | <div class="ilist"><ul> |
| 999 | <li> |
| 1000 | <p> |
| 1001 | <tt>N</tt>'s parent list had <tt>I</tt> removed, because it is an ancestor of the |
| 1002 | other parent <tt>M</tt>. Still, <tt>N</tt> remained because it is !TREESAME.<br /> |
| 1003 | </p> |
| 1004 | </li> |
| 1005 | <li> |
| 1006 | <p> |
| 1007 | <tt>P</tt>'s parent list similarly had <tt>I</tt> removed. <tt>P</tt> was then |
| 1008 | removed completely, because it had one parent and is TREESAME. |
| 1009 | </p> |
| 1010 | </li> |
| 1011 | </ul></div> |
| 1012 | </dd> |
| 1013 | </dl></div> |
| Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1014 | <h3 id="_bisection_helpers">Bisection Helpers</h3><div style="clear:left"></div> |
| 1015 | <div class="vlist"><dl> |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 1016 | <dt> |
| 1017 | --bisect |
| 1018 | </dt> |
| 1019 | <dd> |
| 1020 | <p> |
| 1021 | Limit output to the one commit object which is roughly halfway between |
| 1022 | the included and excluded commits. Thus, if |
| 1023 | </p> |
| Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1024 | </dd> |
| 1025 | </dl></div> |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 1026 | <div class="listingblock"> |
| 1027 | <div class="content"> |
| 1028 | <pre><tt> $ git-rev-list --bisect foo ^bar ^baz</tt></pre> |
| 1029 | </div></div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1030 | <div class="para"><p>outputs <em>midpoint</em>, the output of the two commands</p></div> |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 1031 | <div class="listingblock"> |
| 1032 | <div class="content"> |
| 1033 | <pre><tt> $ git-rev-list foo ^midpoint |
| 1034 | $ git-rev-list midpoint ^bar ^baz</tt></pre> |
| 1035 | </div></div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1036 | <div class="para"><p>would be of roughly the same length. Finding the change which |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 1037 | introduces a regression is thus reduced to a binary search: repeatedly |
| 1038 | generate and test new 'midpoint's until the commit chain is of length |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1039 | one.</p></div> |
| Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1040 | <div class="vlist"><dl> |
| Junio C Hamano | 20f64da | 2007-04-04 18:38:30 | [diff] [blame] | 1041 | <dt> |
| 1042 | --bisect-vars |
| 1043 | </dt> |
| 1044 | <dd> |
| 1045 | <p> |
| 1046 | This calculates the same as <tt>--bisect</tt>, but outputs text ready |
| 1047 | to be eval'ed by the shell. These lines will assign the name of |
| 1048 | the midpoint revision to the variable <tt>bisect_rev</tt>, and the |
| 1049 | expected number of commits to be tested after <tt>bisect_rev</tt> is |
| 1050 | tested to <tt>bisect_nr</tt>, the expected number of commits to be |
| 1051 | tested if <tt>bisect_rev</tt> turns out to be good to <tt>bisect_good</tt>, |
| 1052 | the expected number of commits to be tested if <tt>bisect_rev</tt> |
| 1053 | turns out to be bad to <tt>bisect_bad</tt>, and the number of commits |
| 1054 | we are bisecting right now to <tt>bisect_all</tt>. |
| 1055 | </p> |
| 1056 | </dd> |
| Junio C Hamano | 1974bf2 | 2007-10-31 05:57:20 | [diff] [blame] | 1057 | <dt> |
| 1058 | --bisect-all |
| 1059 | </dt> |
| 1060 | <dd> |
| 1061 | <p> |
| 1062 | This outputs all the commit objects between the included and excluded |
| 1063 | commits, ordered by their distance to the included and excluded |
| 1064 | commits. The farthest from them is displayed first. (This is the only |
| 1065 | one displayed by <tt>--bisect</tt>.) |
| 1066 | </p> |
| Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1067 | </dd> |
| 1068 | </dl></div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1069 | <div class="para"><p>This is useful because it makes it easy to choose a good commit to |
| Junio C Hamano | 1974bf2 | 2007-10-31 05:57:20 | [diff] [blame] | 1070 | test when you want to avoid to test some of them for some reason (they |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1071 | may not compile for example).</p></div> |
| 1072 | <div class="para"><p>This option can be used along with <tt>--bisect-vars</tt>, in this case, |
| Junio C Hamano | 1974bf2 | 2007-10-31 05:57:20 | [diff] [blame] | 1073 | after all the sorted commit objects, there will be the same text as if |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1074 | <tt>--bisect-vars</tt> had been used alone.</p></div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1075 | <h3 id="_commit_ordering">Commit Ordering</h3><div style="clear:left"></div> |
| 1076 | <div class="para"><p>By default, the commits are shown in reverse chronological order.</p></div> |
| 1077 | <div class="vlist"><dl> |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 1078 | <dt> |
| 1079 | --topo-order |
| 1080 | </dt> |
| 1081 | <dd> |
| 1082 | <p> |
| 1083 | This option makes them appear in topological order (i.e. |
| 1084 | descendant commits are shown before their parents). |
| 1085 | </p> |
| 1086 | </dd> |
| 1087 | <dt> |
| 1088 | --date-order |
| 1089 | </dt> |
| 1090 | <dd> |
| 1091 | <p> |
| 1092 | This option is similar to <em>--topo-order</em> in the sense that no |
| 1093 | parent comes before all of its children, but otherwise things |
| 1094 | are still ordered in the commit timestamp order. |
| 1095 | </p> |
| 1096 | </dd> |
| Junio C Hamano | 053827f | 2007-02-14 07:23:58 | [diff] [blame] | 1097 | <dt> |
| 1098 | --reverse |
| 1099 | </dt> |
| 1100 | <dd> |
| 1101 | <p> |
| 1102 | Output the commits in reverse order. |
| Junio C Hamano | bdebabb | 2007-08-23 00:25:09 | [diff] [blame] | 1103 | Cannot be combined with <em>--walk-reflogs</em>. |
| Junio C Hamano | 053827f | 2007-02-14 07:23:58 | [diff] [blame] | 1104 | </p> |
| 1105 | </dd> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1106 | </dl></div> |
| 1107 | <h3 id="_object_traversal">Object Traversal</h3><div style="clear:left"></div> |
| 1108 | <div class="para"><p>These options are mostly targeted for packing of git repositories.</p></div> |
| 1109 | <div class="vlist"><dl> |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 1110 | <dt> |
| 1111 | --objects |
| 1112 | </dt> |
| 1113 | <dd> |
| 1114 | <p> |
| 1115 | Print the object IDs of any object referenced by the listed |
| Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1116 | commits. <em>--objects foo ^bar</em> thus means "send me |
| Junio C Hamano | 89e135d | 2006-09-03 06:18:25 | [diff] [blame] | 1117 | all object IDs which I need to download if I have the commit |
| 1118 | object <em>bar</em>, but not <em>foo</em>". |
| 1119 | </p> |
| 1120 | </dd> |
| 1121 | <dt> |
| 1122 | --objects-edge |
| 1123 | </dt> |
| 1124 | <dd> |
| 1125 | <p> |
| 1126 | Similar to <em>--objects</em>, but also print the IDs of excluded |
| 1127 | commits prefixed with a "-" character. This is used by |
| 1128 | <a href="git-pack-objects.html">git-pack-objects(1)</a> to build "thin" pack, which records |
| 1129 | objects in deltified form based on objects contained in these |
| 1130 | excluded commits to reduce network traffic. |
| 1131 | </p> |
| 1132 | </dd> |
| 1133 | <dt> |
| 1134 | --unpacked |
| 1135 | </dt> |
| 1136 | <dd> |
| 1137 | <p> |
| 1138 | Only useful with <em>--objects</em>; print the object IDs that are not |
| 1139 | in packs. |
| Junio C Hamano | a0778c9 | 2006-08-29 04:03:11 | [diff] [blame] | 1140 | </p> |
| 1141 | </dd> |
| Junio C Hamano | a196f6d | 2007-07-24 08:10:27 | [diff] [blame] | 1142 | <dt> |
| 1143 | --no-walk |
| 1144 | </dt> |
| 1145 | <dd> |
| 1146 | <p> |
| 1147 | Only show the given revs, but do not traverse their ancestors. |
| 1148 | </p> |
| 1149 | </dd> |
| 1150 | <dt> |
| 1151 | --do-walk |
| 1152 | </dt> |
| 1153 | <dd> |
| 1154 | <p> |
| 1155 | Overrides a previous --no-walk. |
| 1156 | </p> |
| 1157 | </dd> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1158 | </dl></div> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1159 | </div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1160 | <h2 id="_pretty_formats">PRETTY FORMATS</h2> |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 1161 | <div class="sectionbody"> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1162 | <div class="para"><p>If the commit is a merge, and if the pretty-format |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 1163 | is not <em>oneline</em>, <em>email</em> or <em>raw</em>, an additional line is |
| 1164 | inserted before the <em>Author:</em> line. This line begins with |
| 1165 | "Merge: " and the sha1s of ancestral commits are printed, |
| 1166 | separated by spaces. Note that the listed commits may not |
| 1167 | necessarily be the list of the <strong>direct</strong> parent commits if you |
| 1168 | have limited your view of history: for example, if you are |
| 1169 | only interested in changes related to a certain directory or |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1170 | file.</p></div> |
| 1171 | <div class="para"><p>Here are some additional details for each format:</p></div> |
| 1172 | <div class="ilist"><ul> |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 1173 | <li> |
| 1174 | <p> |
| 1175 | <em>oneline</em> |
| 1176 | </p> |
| 1177 | <div class="literalblock"> |
| 1178 | <div class="content"> |
| 1179 | <pre><tt><sha1> <title line></tt></pre> |
| 1180 | </div></div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1181 | <div class="para"><p>This is designed to be as compact as possible.</p></div> |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 1182 | </li> |
| 1183 | <li> |
| 1184 | <p> |
| 1185 | <em>short</em> |
| 1186 | </p> |
| 1187 | <div class="literalblock"> |
| 1188 | <div class="content"> |
| 1189 | <pre><tt>commit <sha1> |
| 1190 | Author: <author></tt></pre> |
| 1191 | </div></div> |
| 1192 | <div class="literalblock"> |
| 1193 | <div class="content"> |
| 1194 | <pre><tt><title line></tt></pre> |
| 1195 | </div></div> |
| 1196 | </li> |
| 1197 | <li> |
| 1198 | <p> |
| 1199 | <em>medium</em> |
| 1200 | </p> |
| 1201 | <div class="literalblock"> |
| 1202 | <div class="content"> |
| 1203 | <pre><tt>commit <sha1> |
| 1204 | Author: <author> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1205 | Date: <author date></tt></pre> |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 1206 | </div></div> |
| 1207 | <div class="literalblock"> |
| 1208 | <div class="content"> |
| 1209 | <pre><tt><title line></tt></pre> |
| 1210 | </div></div> |
| 1211 | <div class="literalblock"> |
| 1212 | <div class="content"> |
| 1213 | <pre><tt><full commit message></tt></pre> |
| 1214 | </div></div> |
| 1215 | </li> |
| 1216 | <li> |
| 1217 | <p> |
| 1218 | <em>full</em> |
| 1219 | </p> |
| 1220 | <div class="literalblock"> |
| 1221 | <div class="content"> |
| 1222 | <pre><tt>commit <sha1> |
| 1223 | Author: <author> |
| 1224 | Commit: <committer></tt></pre> |
| 1225 | </div></div> |
| 1226 | <div class="literalblock"> |
| 1227 | <div class="content"> |
| 1228 | <pre><tt><title line></tt></pre> |
| 1229 | </div></div> |
| 1230 | <div class="literalblock"> |
| 1231 | <div class="content"> |
| 1232 | <pre><tt><full commit message></tt></pre> |
| 1233 | </div></div> |
| 1234 | </li> |
| 1235 | <li> |
| 1236 | <p> |
| 1237 | <em>fuller</em> |
| 1238 | </p> |
| 1239 | <div class="literalblock"> |
| 1240 | <div class="content"> |
| 1241 | <pre><tt>commit <sha1> |
| 1242 | Author: <author> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1243 | AuthorDate: <author date> |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 1244 | Commit: <committer> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1245 | CommitDate: <committer date></tt></pre> |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 1246 | </div></div> |
| 1247 | <div class="literalblock"> |
| 1248 | <div class="content"> |
| 1249 | <pre><tt><title line></tt></pre> |
| 1250 | </div></div> |
| 1251 | <div class="literalblock"> |
| 1252 | <div class="content"> |
| 1253 | <pre><tt><full commit message></tt></pre> |
| 1254 | </div></div> |
| 1255 | </li> |
| 1256 | <li> |
| 1257 | <p> |
| 1258 | <em>email</em> |
| 1259 | </p> |
| 1260 | <div class="literalblock"> |
| 1261 | <div class="content"> |
| 1262 | <pre><tt>From <sha1> <date> |
| 1263 | From: <author> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1264 | Date: <author date> |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 1265 | Subject: [PATCH] <title line></tt></pre> |
| 1266 | </div></div> |
| 1267 | <div class="literalblock"> |
| 1268 | <div class="content"> |
| 1269 | <pre><tt><full commit message></tt></pre> |
| 1270 | </div></div> |
| 1271 | </li> |
| 1272 | <li> |
| 1273 | <p> |
| 1274 | <em>raw</em> |
| 1275 | </p> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1276 | <div class="para"><p>The <em>raw</em> format shows the entire commit exactly as |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 1277 | stored in the commit object. Notably, the SHA1s are |
| 1278 | displayed in full, regardless of whether --abbrev or |
| 1279 | --no-abbrev are used, and <em>parents</em> information show the |
| 1280 | true parent commits, without taking grafts nor history |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1281 | simplification into account.</p></div> |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 1282 | </li> |
| 1283 | <li> |
| 1284 | <p> |
| 1285 | <em>format:</em> |
| 1286 | </p> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1287 | <div class="para"><p>The <em>format:</em> format allows you to specify which information |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 1288 | you want to show. It works a little bit like printf format, |
| 1289 | with the notable exception that you get a newline with <em>%n</em> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1290 | instead of <em>\n</em>.</p></div> |
| 1291 | <div class="para"><p>E.g, <em>format:"The author of %h was %an, %ar%nThe title was >>%s<<%n"</em> |
| 1292 | would show something like this:</p></div> |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 1293 | <div class="listingblock"> |
| 1294 | <div class="content"> |
| 1295 | <pre><tt>The author of fe6e0ee was Junio C Hamano, 23 hours ago |
| 1296 | The title was >>t4119: test autocomputing -p<n> for traditional diff input.<< |
| 1297 | </tt></pre> |
| 1298 | </div></div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1299 | <div class="para"><p>The placeholders are:</p></div> |
| 1300 | <div class="ilist"><ul> |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 1301 | <li> |
| 1302 | <p> |
| 1303 | <em>%H</em>: commit hash |
| 1304 | </p> |
| 1305 | </li> |
| 1306 | <li> |
| 1307 | <p> |
| 1308 | <em>%h</em>: abbreviated commit hash |
| 1309 | </p> |
| 1310 | </li> |
| 1311 | <li> |
| 1312 | <p> |
| 1313 | <em>%T</em>: tree hash |
| 1314 | </p> |
| 1315 | </li> |
| 1316 | <li> |
| 1317 | <p> |
| 1318 | <em>%t</em>: abbreviated tree hash |
| 1319 | </p> |
| 1320 | </li> |
| 1321 | <li> |
| 1322 | <p> |
| 1323 | <em>%P</em>: parent hashes |
| 1324 | </p> |
| 1325 | </li> |
| 1326 | <li> |
| 1327 | <p> |
| 1328 | <em>%p</em>: abbreviated parent hashes |
| 1329 | </p> |
| 1330 | </li> |
| 1331 | <li> |
| 1332 | <p> |
| 1333 | <em>%an</em>: author name |
| 1334 | </p> |
| 1335 | </li> |
| 1336 | <li> |
| 1337 | <p> |
| Junio C Hamano | f5a9362 | 2008-07-16 03:23:57 | [diff] [blame] | 1338 | <em>%aN</em>: author name (respecting .mailmap) |
| 1339 | </p> |
| 1340 | </li> |
| 1341 | <li> |
| 1342 | <p> |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 1343 | <em>%ae</em>: author email |
| 1344 | </p> |
| 1345 | </li> |
| 1346 | <li> |
| 1347 | <p> |
| Junio C Hamano | a387df3 | 2008-08-29 08:56:58 | [diff] [blame] | 1348 | <em>%ad</em>: author date (format respects --date= option) |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 1349 | </p> |
| 1350 | </li> |
| 1351 | <li> |
| 1352 | <p> |
| 1353 | <em>%aD</em>: author date, RFC2822 style |
| 1354 | </p> |
| 1355 | </li> |
| 1356 | <li> |
| 1357 | <p> |
| 1358 | <em>%ar</em>: author date, relative |
| 1359 | </p> |
| 1360 | </li> |
| 1361 | <li> |
| 1362 | <p> |
| 1363 | <em>%at</em>: author date, UNIX timestamp |
| 1364 | </p> |
| 1365 | </li> |
| 1366 | <li> |
| 1367 | <p> |
| Junio C Hamano | 02f130b | 2007-07-14 08:26:56 | [diff] [blame] | 1368 | <em>%ai</em>: author date, ISO 8601 format |
| 1369 | </p> |
| 1370 | </li> |
| 1371 | <li> |
| 1372 | <p> |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 1373 | <em>%cn</em>: committer name |
| 1374 | </p> |
| 1375 | </li> |
| 1376 | <li> |
| 1377 | <p> |
| Junio C Hamano | f5a9362 | 2008-07-16 03:23:57 | [diff] [blame] | 1378 | <em>%cN</em>: committer name (respecting .mailmap) |
| 1379 | </p> |
| 1380 | </li> |
| 1381 | <li> |
| 1382 | <p> |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 1383 | <em>%ce</em>: committer email |
| 1384 | </p> |
| 1385 | </li> |
| 1386 | <li> |
| 1387 | <p> |
| 1388 | <em>%cd</em>: committer date |
| 1389 | </p> |
| 1390 | </li> |
| 1391 | <li> |
| 1392 | <p> |
| 1393 | <em>%cD</em>: committer date, RFC2822 style |
| 1394 | </p> |
| 1395 | </li> |
| 1396 | <li> |
| 1397 | <p> |
| 1398 | <em>%cr</em>: committer date, relative |
| 1399 | </p> |
| 1400 | </li> |
| 1401 | <li> |
| 1402 | <p> |
| 1403 | <em>%ct</em>: committer date, UNIX timestamp |
| 1404 | </p> |
| 1405 | </li> |
| 1406 | <li> |
| 1407 | <p> |
| Junio C Hamano | 02f130b | 2007-07-14 08:26:56 | [diff] [blame] | 1408 | <em>%ci</em>: committer date, ISO 8601 format |
| 1409 | </p> |
| 1410 | </li> |
| 1411 | <li> |
| 1412 | <p> |
| Junio C Hamano | 5e4d8de | 2008-09-19 06:27:02 | [diff] [blame] | 1413 | <em>%d</em>: ref names, like the --decorate option of <a href="git-log.html">git-log(1)</a> |
| 1414 | </p> |
| 1415 | </li> |
| 1416 | <li> |
| 1417 | <p> |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 1418 | <em>%e</em>: encoding |
| 1419 | </p> |
| 1420 | </li> |
| 1421 | <li> |
| 1422 | <p> |
| 1423 | <em>%s</em>: subject |
| 1424 | </p> |
| 1425 | </li> |
| 1426 | <li> |
| 1427 | <p> |
| 1428 | <em>%b</em>: body |
| 1429 | </p> |
| 1430 | </li> |
| 1431 | <li> |
| 1432 | <p> |
| 1433 | <em>%Cred</em>: switch color to red |
| 1434 | </p> |
| 1435 | </li> |
| 1436 | <li> |
| 1437 | <p> |
| 1438 | <em>%Cgreen</em>: switch color to green |
| 1439 | </p> |
| 1440 | </li> |
| 1441 | <li> |
| 1442 | <p> |
| 1443 | <em>%Cblue</em>: switch color to blue |
| 1444 | </p> |
| 1445 | </li> |
| 1446 | <li> |
| 1447 | <p> |
| 1448 | <em>%Creset</em>: reset color |
| 1449 | </p> |
| 1450 | </li> |
| 1451 | <li> |
| 1452 | <p> |
| 1453 | <em>%m</em>: left, right or boundary mark |
| 1454 | </p> |
| 1455 | </li> |
| 1456 | <li> |
| 1457 | <p> |
| 1458 | <em>%n</em>: newline |
| 1459 | </p> |
| 1460 | </li> |
| Junio C Hamano | b78d259 | 2008-04-09 09:39:08 | [diff] [blame] | 1461 | <li> |
| 1462 | <p> |
| 1463 | <em>%x00</em>: print a byte from a hex code |
| 1464 | </p> |
| 1465 | </li> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1466 | </ul></div> |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 1467 | </li> |
| Junio C Hamano | 6fb124c | 2008-06-13 10:04:01 | [diff] [blame] | 1468 | <li> |
| 1469 | <p> |
| 1470 | <em>tformat:</em> |
| 1471 | </p> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1472 | <div class="para"><p>The <em>tformat:</em> format works exactly like <em>format:</em>, except that it |
| Junio C Hamano | 6fb124c | 2008-06-13 10:04:01 | [diff] [blame] | 1473 | provides "terminator" semantics instead of "separator" semantics. In |
| 1474 | other words, each commit has the message terminator character (usually a |
| 1475 | newline) appended, rather than a separator placed between entries. |
| 1476 | This means that the final entry of a single-line format will be properly |
| 1477 | terminated with a new line, just as the "oneline" format does. |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1478 | For example:</p></div> |
| Junio C Hamano | 6fb124c | 2008-06-13 10:04:01 | [diff] [blame] | 1479 | <div class="listingblock"> |
| 1480 | <div class="content"> |
| 1481 | <pre><tt>$ git log -2 --pretty=format:%h 4da45bef \ |
| 1482 | | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/' |
| 1483 | 4da45be |
| 1484 | 7134973 -- NO NEWLINE |
| 1485 | |
| 1486 | $ git log -2 --pretty=tformat:%h 4da45bef \ |
| 1487 | | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/' |
| 1488 | 4da45be |
| 1489 | 7134973</tt></pre> |
| 1490 | </div></div> |
| 1491 | </li> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1492 | </ul></div> |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 1493 | </div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1494 | <h2 id="_author">Author</h2> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1495 | <div class="sectionbody"> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1496 | <div class="para"><p>Written by Linus Torvalds <torvalds@osdl.org></p></div> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1497 | </div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1498 | <h2 id="_documentation">Documentation</h2> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1499 | <div class="sectionbody"> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1500 | <div class="para"><p>Documentation by David Greaves, Junio C Hamano, Jonas Fonseca |
| 1501 | and the git-list <git@vger.kernel.org>.</p></div> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1502 | </div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1503 | <h2 id="_git">GIT</h2> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1504 | <div class="sectionbody"> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1505 | <div class="para"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1506 | </div> |
| 1507 | <div id="footer"> |
| 1508 | <div id="footer-text"> |
| Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 1509 | Last updated 2008-10-10 15:30:49 UTC |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1510 | </div> |
| 1511 | </div> |
| 1512 | </body> |
| 1513 | </html> |