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-whatchanged(1)</title> |
| 308 | </head> |
| 309 | <body> |
| 310 | <div id="header"> |
| 311 | <h1> |
| 312 | git-whatchanged(1) Manual Page |
| 313 | </h1> |
| 314 | <h2>NAME</h2> |
| 315 | <div class="sectionbody"> |
| 316 | <p>git-whatchanged - |
Junio C Hamano | 0107892 | 2006-03-10 00:31:47 | [diff] [blame] | 317 | Show logs with difference each commit introduces |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 318 | </p> |
| 319 | </div> |
| 320 | </div> |
| 321 | <h2>SYNOPSIS</h2> |
| 322 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 323 | <div class="para"><p><em>git whatchanged</em> <option>…</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 324 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 325 | <h2 id="_description">DESCRIPTION</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 326 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 327 | <div class="para"><p>Shows commit logs and diff output each commit introduces. The |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 328 | command internally invokes <em>git rev-list</em> piped to |
| 329 | <em>git diff-tree</em>, and takes command line options for both of |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 330 | these commands.</p></div> |
| 331 | <div class="para"><p>This manual page describes only the most frequently used options.</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 332 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 333 | <h2 id="_options">OPTIONS</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 334 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 335 | <div class="vlist"><dl> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 336 | <dt> |
| 337 | -p |
| 338 | </dt> |
| 339 | <dd> |
| 340 | <p> |
| 341 | Show textual diffs, instead of the git internal diff |
| 342 | output format that is useful only to tell the changed |
| 343 | paths and their nature of changes. |
| 344 | </p> |
| 345 | </dd> |
| 346 | <dt> |
Junio C Hamano | f9771f6 | 2007-01-17 17:42:30 | [diff] [blame] | 347 | -<n> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 348 | </dt> |
| 349 | <dd> |
| 350 | <p> |
| 351 | Limit output to <n> commits. |
| 352 | </p> |
| 353 | </dd> |
| 354 | <dt> |
| 355 | <since>..<until> |
| 356 | </dt> |
| 357 | <dd> |
| 358 | <p> |
| 359 | Limit output to between the two named commits (bottom |
| 360 | exclusive, top inclusive). |
| 361 | </p> |
| 362 | </dd> |
| 363 | <dt> |
| 364 | -r |
| 365 | </dt> |
| 366 | <dd> |
| 367 | <p> |
| 368 | Show git internal diff output, but for the whole tree, |
| 369 | not just the top level. |
| 370 | </p> |
| 371 | </dd> |
| 372 | <dt> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 373 | -m |
| 374 | </dt> |
| 375 | <dd> |
| 376 | <p> |
| 377 | By default, differences for merge commits are not shown. |
| 378 | With this flag, show differences to that commit from all |
| 379 | of its parents. |
| 380 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 381 | <div class="para"><p>However, it is not very useful in general, although it |
| 382 | <strong>is</strong> useful on a file-by-file basis.</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 383 | </dd> |
Junio C Hamano | 86bcccc | 2008-03-08 09:33:55 | [diff] [blame] | 384 | <dt> |
| 385 | --pretty[=<em><format></em>] |
| 386 | </dt> |
Junio C Hamano | 0a23522 | 2009-03-06 08:21:09 | [diff] [blame] | 387 | <dt> |
| 388 | --format[=<em><format></em>] |
| 389 | </dt> |
Junio C Hamano | 86bcccc | 2008-03-08 09:33:55 | [diff] [blame] | 390 | <dd> |
| 391 | <p> |
| 392 | Pretty-print the contents of the commit logs in a given format, |
| 393 | where <em><format></em> can be one of <em>oneline</em>, <em>short</em>, <em>medium</em>, |
| 394 | <em>full</em>, <em>fuller</em>, <em>email</em>, <em>raw</em> and <em>format:<string></em>. |
| 395 | When omitted, the format defaults to <em>medium</em>. |
| 396 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 397 | <div class="para"><p>Note: you can specify the default pretty format in the repository |
| 398 | configuration (see <a href="git-config.html">git-config(1)</a>).</p></div> |
Junio C Hamano | 86bcccc | 2008-03-08 09:33:55 | [diff] [blame] | 399 | </dd> |
| 400 | <dt> |
| 401 | --abbrev-commit |
| 402 | </dt> |
| 403 | <dd> |
| 404 | <p> |
| 405 | Instead of showing the full 40-byte hexadecimal commit object |
Junio C Hamano | 6efe302 | 2009-01-13 16:47:56 | [diff] [blame] | 406 | name, show only a partial prefix. Non default number of |
Junio C Hamano | 86bcccc | 2008-03-08 09:33:55 | [diff] [blame] | 407 | digits can be specified with "--abbrev=<n>" (which also modifies |
| 408 | diff output, if it is displayed). |
| 409 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 410 | <div class="para"><p>This should make "--pretty=oneline" a whole lot more readable for |
| 411 | people using 80-column terminals.</p></div> |
Junio C Hamano | 86bcccc | 2008-03-08 09:33:55 | [diff] [blame] | 412 | </dd> |
| 413 | <dt> |
Junio C Hamano | 0a23522 | 2009-03-06 08:21:09 | [diff] [blame] | 414 | --oneline |
| 415 | </dt> |
| 416 | <dd> |
| 417 | <p> |
| 418 | This is a shorthand for "--pretty=oneline --abbrev-commit" |
| 419 | used together. |
| 420 | </p> |
| 421 | </dd> |
| 422 | <dt> |
Junio C Hamano | 86bcccc | 2008-03-08 09:33:55 | [diff] [blame] | 423 | --encoding[=<encoding>] |
| 424 | </dt> |
| 425 | <dd> |
| 426 | <p> |
| 427 | The commit objects record the encoding used for the log message |
| 428 | in their encoding header; this option can be used to tell the |
| 429 | command to re-code the commit log message in the encoding |
| 430 | preferred by the user. For non plumbing commands this |
| 431 | defaults to UTF-8. |
| 432 | </p> |
| 433 | </dd> |
Junio C Hamano | 57827fb | 2010-01-23 03:02:50 | [diff] [blame] | 434 | <dt> |
| 435 | --no-notes |
| 436 | </dt> |
| 437 | <dt> |
| 438 | --show-notes |
| 439 | </dt> |
| 440 | <dd> |
| 441 | <p> |
| 442 | Show the notes (see <a href="git-notes.html">git-notes(1)</a>) that annotate the |
| 443 | commit, when showing the commit log message. This is the default |
| 444 | for <tt>git log</tt>, <tt>git show</tt> and <tt>git whatchanged</tt> commands when |
| 445 | there is no <tt>--pretty</tt>, <tt>--format</tt> nor <tt>--oneline</tt> option is |
| 446 | given on the command line. |
| 447 | </p> |
| 448 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 449 | </dl></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 450 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 451 | <h2 id="_pretty_formats">PRETTY FORMATS</h2> |
Junio C Hamano | 86bcccc | 2008-03-08 09:33:55 | [diff] [blame] | 452 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 453 | <div class="para"><p>If the commit is a merge, and if the pretty-format |
Junio C Hamano | 86bcccc | 2008-03-08 09:33:55 | [diff] [blame] | 454 | is not <em>oneline</em>, <em>email</em> or <em>raw</em>, an additional line is |
| 455 | inserted before the <em>Author:</em> line. This line begins with |
| 456 | "Merge: " and the sha1s of ancestral commits are printed, |
| 457 | separated by spaces. Note that the listed commits may not |
| 458 | necessarily be the list of the <strong>direct</strong> parent commits if you |
| 459 | have limited your view of history: for example, if you are |
| 460 | only interested in changes related to a certain directory or |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 461 | file.</p></div> |
| 462 | <div class="para"><p>Here are some additional details for each format:</p></div> |
| 463 | <div class="ilist"><ul> |
Junio C Hamano | 86bcccc | 2008-03-08 09:33:55 | [diff] [blame] | 464 | <li> |
| 465 | <p> |
| 466 | <em>oneline</em> |
| 467 | </p> |
| 468 | <div class="literalblock"> |
| 469 | <div class="content"> |
| 470 | <pre><tt><sha1> <title line></tt></pre> |
| 471 | </div></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 472 | <div class="para"><p>This is designed to be as compact as possible.</p></div> |
Junio C Hamano | 86bcccc | 2008-03-08 09:33:55 | [diff] [blame] | 473 | </li> |
| 474 | <li> |
| 475 | <p> |
| 476 | <em>short</em> |
| 477 | </p> |
| 478 | <div class="literalblock"> |
| 479 | <div class="content"> |
| 480 | <pre><tt>commit <sha1> |
| 481 | Author: <author></tt></pre> |
| 482 | </div></div> |
| 483 | <div class="literalblock"> |
| 484 | <div class="content"> |
| 485 | <pre><tt><title line></tt></pre> |
| 486 | </div></div> |
| 487 | </li> |
| 488 | <li> |
| 489 | <p> |
| 490 | <em>medium</em> |
| 491 | </p> |
| 492 | <div class="literalblock"> |
| 493 | <div class="content"> |
| 494 | <pre><tt>commit <sha1> |
| 495 | Author: <author> |
Junio C Hamano | 6a3c827 | 2008-12-19 21:38:18 | [diff] [blame] | 496 | Date: <author date></tt></pre> |
Junio C Hamano | 86bcccc | 2008-03-08 09:33:55 | [diff] [blame] | 497 | </div></div> |
| 498 | <div class="literalblock"> |
| 499 | <div class="content"> |
| 500 | <pre><tt><title line></tt></pre> |
| 501 | </div></div> |
| 502 | <div class="literalblock"> |
| 503 | <div class="content"> |
| 504 | <pre><tt><full commit message></tt></pre> |
| 505 | </div></div> |
| 506 | </li> |
| 507 | <li> |
| 508 | <p> |
| 509 | <em>full</em> |
| 510 | </p> |
| 511 | <div class="literalblock"> |
| 512 | <div class="content"> |
| 513 | <pre><tt>commit <sha1> |
| 514 | Author: <author> |
| 515 | Commit: <committer></tt></pre> |
| 516 | </div></div> |
| 517 | <div class="literalblock"> |
| 518 | <div class="content"> |
| 519 | <pre><tt><title line></tt></pre> |
| 520 | </div></div> |
| 521 | <div class="literalblock"> |
| 522 | <div class="content"> |
| 523 | <pre><tt><full commit message></tt></pre> |
| 524 | </div></div> |
| 525 | </li> |
| 526 | <li> |
| 527 | <p> |
| 528 | <em>fuller</em> |
| 529 | </p> |
| 530 | <div class="literalblock"> |
| 531 | <div class="content"> |
| 532 | <pre><tt>commit <sha1> |
Junio C Hamano | 6a3c827 | 2008-12-19 21:38:18 | [diff] [blame] | 533 | Author: <author> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 534 | AuthorDate: <author date> |
Junio C Hamano | 6a3c827 | 2008-12-19 21:38:18 | [diff] [blame] | 535 | Commit: <committer> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 536 | CommitDate: <committer date></tt></pre> |
Junio C Hamano | 86bcccc | 2008-03-08 09:33:55 | [diff] [blame] | 537 | </div></div> |
| 538 | <div class="literalblock"> |
| 539 | <div class="content"> |
| 540 | <pre><tt><title line></tt></pre> |
| 541 | </div></div> |
| 542 | <div class="literalblock"> |
| 543 | <div class="content"> |
| 544 | <pre><tt><full commit message></tt></pre> |
| 545 | </div></div> |
| 546 | </li> |
| 547 | <li> |
| 548 | <p> |
| 549 | <em>email</em> |
| 550 | </p> |
| 551 | <div class="literalblock"> |
| 552 | <div class="content"> |
| 553 | <pre><tt>From <sha1> <date> |
| 554 | From: <author> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 555 | Date: <author date> |
Junio C Hamano | 86bcccc | 2008-03-08 09:33:55 | [diff] [blame] | 556 | Subject: [PATCH] <title line></tt></pre> |
| 557 | </div></div> |
| 558 | <div class="literalblock"> |
| 559 | <div class="content"> |
| 560 | <pre><tt><full commit message></tt></pre> |
| 561 | </div></div> |
| 562 | </li> |
| 563 | <li> |
| 564 | <p> |
| 565 | <em>raw</em> |
| 566 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 567 | <div class="para"><p>The <em>raw</em> format shows the entire commit exactly as |
Junio C Hamano | 86bcccc | 2008-03-08 09:33:55 | [diff] [blame] | 568 | stored in the commit object. Notably, the SHA1s are |
| 569 | displayed in full, regardless of whether --abbrev or |
| 570 | --no-abbrev are used, and <em>parents</em> information show the |
| 571 | true parent commits, without taking grafts nor history |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 572 | simplification into account.</p></div> |
Junio C Hamano | 86bcccc | 2008-03-08 09:33:55 | [diff] [blame] | 573 | </li> |
| 574 | <li> |
| 575 | <p> |
| 576 | <em>format:</em> |
| 577 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 578 | <div class="para"><p>The <em>format:</em> format allows you to specify which information |
Junio C Hamano | 86bcccc | 2008-03-08 09:33:55 | [diff] [blame] | 579 | you want to show. It works a little bit like printf format, |
| 580 | 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] | 581 | instead of <em>\n</em>.</p></div> |
| 582 | <div class="para"><p>E.g, <em>format:"The author of %h was %an, %ar%nThe title was >>%s<<%n"</em> |
| 583 | would show something like this:</p></div> |
Junio C Hamano | 86bcccc | 2008-03-08 09:33:55 | [diff] [blame] | 584 | <div class="listingblock"> |
| 585 | <div class="content"> |
| 586 | <pre><tt>The author of fe6e0ee was Junio C Hamano, 23 hours ago |
| 587 | The title was >>t4119: test autocomputing -p<n> for traditional diff input.<< |
| 588 | </tt></pre> |
| 589 | </div></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 590 | <div class="para"><p>The placeholders are:</p></div> |
| 591 | <div class="ilist"><ul> |
Junio C Hamano | 86bcccc | 2008-03-08 09:33:55 | [diff] [blame] | 592 | <li> |
| 593 | <p> |
| 594 | <em>%H</em>: commit hash |
| 595 | </p> |
| 596 | </li> |
| 597 | <li> |
| 598 | <p> |
| 599 | <em>%h</em>: abbreviated commit hash |
| 600 | </p> |
| 601 | </li> |
| 602 | <li> |
| 603 | <p> |
| 604 | <em>%T</em>: tree hash |
| 605 | </p> |
| 606 | </li> |
| 607 | <li> |
| 608 | <p> |
| 609 | <em>%t</em>: abbreviated tree hash |
| 610 | </p> |
| 611 | </li> |
| 612 | <li> |
| 613 | <p> |
| 614 | <em>%P</em>: parent hashes |
| 615 | </p> |
| 616 | </li> |
| 617 | <li> |
| 618 | <p> |
| 619 | <em>%p</em>: abbreviated parent hashes |
| 620 | </p> |
| 621 | </li> |
| 622 | <li> |
| 623 | <p> |
| 624 | <em>%an</em>: author name |
| 625 | </p> |
| 626 | </li> |
| 627 | <li> |
| 628 | <p> |
Junio C Hamano | 8bc410e | 2009-02-15 10:38:19 | [diff] [blame] | 629 | <em>%aN</em>: author name (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>) |
Junio C Hamano | f5a9362 | 2008-07-16 03:23:57 | [diff] [blame] | 630 | </p> |
| 631 | </li> |
| 632 | <li> |
| 633 | <p> |
Junio C Hamano | 86bcccc | 2008-03-08 09:33:55 | [diff] [blame] | 634 | <em>%ae</em>: author email |
| 635 | </p> |
| 636 | </li> |
| 637 | <li> |
| 638 | <p> |
Junio C Hamano | 8bc410e | 2009-02-15 10:38:19 | [diff] [blame] | 639 | <em>%aE</em>: author email (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>) |
| 640 | </p> |
| 641 | </li> |
| 642 | <li> |
| 643 | <p> |
Junio C Hamano | a387df3 | 2008-08-29 08:56:58 | [diff] [blame] | 644 | <em>%ad</em>: author date (format respects --date= option) |
Junio C Hamano | 86bcccc | 2008-03-08 09:33:55 | [diff] [blame] | 645 | </p> |
| 646 | </li> |
| 647 | <li> |
| 648 | <p> |
| 649 | <em>%aD</em>: author date, RFC2822 style |
| 650 | </p> |
| 651 | </li> |
| 652 | <li> |
| 653 | <p> |
| 654 | <em>%ar</em>: author date, relative |
| 655 | </p> |
| 656 | </li> |
| 657 | <li> |
| 658 | <p> |
| 659 | <em>%at</em>: author date, UNIX timestamp |
| 660 | </p> |
| 661 | </li> |
| 662 | <li> |
| 663 | <p> |
| 664 | <em>%ai</em>: author date, ISO 8601 format |
| 665 | </p> |
| 666 | </li> |
| 667 | <li> |
| 668 | <p> |
| 669 | <em>%cn</em>: committer name |
| 670 | </p> |
| 671 | </li> |
| 672 | <li> |
| 673 | <p> |
Junio C Hamano | 8bc410e | 2009-02-15 10:38:19 | [diff] [blame] | 674 | <em>%cN</em>: committer name (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>) |
Junio C Hamano | f5a9362 | 2008-07-16 03:23:57 | [diff] [blame] | 675 | </p> |
| 676 | </li> |
| 677 | <li> |
| 678 | <p> |
Junio C Hamano | 86bcccc | 2008-03-08 09:33:55 | [diff] [blame] | 679 | <em>%ce</em>: committer email |
| 680 | </p> |
| 681 | </li> |
| 682 | <li> |
| 683 | <p> |
Junio C Hamano | 8bc410e | 2009-02-15 10:38:19 | [diff] [blame] | 684 | <em>%cE</em>: committer email (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>) |
| 685 | </p> |
| 686 | </li> |
| 687 | <li> |
| 688 | <p> |
Junio C Hamano | 86bcccc | 2008-03-08 09:33:55 | [diff] [blame] | 689 | <em>%cd</em>: committer date |
| 690 | </p> |
| 691 | </li> |
| 692 | <li> |
| 693 | <p> |
| 694 | <em>%cD</em>: committer date, RFC2822 style |
| 695 | </p> |
| 696 | </li> |
| 697 | <li> |
| 698 | <p> |
| 699 | <em>%cr</em>: committer date, relative |
| 700 | </p> |
| 701 | </li> |
| 702 | <li> |
| 703 | <p> |
| 704 | <em>%ct</em>: committer date, UNIX timestamp |
| 705 | </p> |
| 706 | </li> |
| 707 | <li> |
| 708 | <p> |
| 709 | <em>%ci</em>: committer date, ISO 8601 format |
| 710 | </p> |
| 711 | </li> |
| 712 | <li> |
| 713 | <p> |
Junio C Hamano | 5e4d8de | 2008-09-19 06:27:02 | [diff] [blame] | 714 | <em>%d</em>: ref names, like the --decorate option of <a href="git-log.html">git-log(1)</a> |
| 715 | </p> |
| 716 | </li> |
| 717 | <li> |
| 718 | <p> |
Junio C Hamano | 86bcccc | 2008-03-08 09:33:55 | [diff] [blame] | 719 | <em>%e</em>: encoding |
| 720 | </p> |
| 721 | </li> |
| 722 | <li> |
| 723 | <p> |
| 724 | <em>%s</em>: subject |
| 725 | </p> |
| 726 | </li> |
| 727 | <li> |
| 728 | <p> |
Junio C Hamano | 5f9a6f0 | 2009-04-06 08:26:56 | [diff] [blame] | 729 | <em>%f</em>: sanitized subject line, suitable for a filename |
| 730 | </p> |
| 731 | </li> |
| 732 | <li> |
| 733 | <p> |
Junio C Hamano | 86bcccc | 2008-03-08 09:33:55 | [diff] [blame] | 734 | <em>%b</em>: body |
| 735 | </p> |
| 736 | </li> |
| 737 | <li> |
| 738 | <p> |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 739 | <em>%N</em>: commit notes |
| 740 | </p> |
| 741 | </li> |
| 742 | <li> |
| 743 | <p> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 744 | <em>%gD</em>: reflog selector, e.g., <tt>refs/stash@{1}</tt> |
| 745 | </p> |
| 746 | </li> |
| 747 | <li> |
| 748 | <p> |
| 749 | <em>%gd</em>: shortened reflog selector, e.g., <tt>stash@{1}</tt> |
| 750 | </p> |
| 751 | </li> |
| 752 | <li> |
| 753 | <p> |
| 754 | <em>%gs</em>: reflog subject |
| 755 | </p> |
| 756 | </li> |
| 757 | <li> |
| 758 | <p> |
Junio C Hamano | 86bcccc | 2008-03-08 09:33:55 | [diff] [blame] | 759 | <em>%Cred</em>: switch color to red |
| 760 | </p> |
| 761 | </li> |
| 762 | <li> |
| 763 | <p> |
| 764 | <em>%Cgreen</em>: switch color to green |
| 765 | </p> |
| 766 | </li> |
| 767 | <li> |
| 768 | <p> |
| 769 | <em>%Cblue</em>: switch color to blue |
| 770 | </p> |
| 771 | </li> |
| 772 | <li> |
| 773 | <p> |
| 774 | <em>%Creset</em>: reset color |
| 775 | </p> |
| 776 | </li> |
| 777 | <li> |
| 778 | <p> |
Junio C Hamano | cc0cb31 | 2009-01-22 03:38:50 | [diff] [blame] | 779 | <em>%C(…)</em>: color specification, as described in color.branch.* config option |
| 780 | </p> |
| 781 | </li> |
| 782 | <li> |
| 783 | <p> |
Junio C Hamano | 86bcccc | 2008-03-08 09:33:55 | [diff] [blame] | 784 | <em>%m</em>: left, right or boundary mark |
| 785 | </p> |
| 786 | </li> |
| 787 | <li> |
| 788 | <p> |
| 789 | <em>%n</em>: newline |
| 790 | </p> |
| 791 | </li> |
Junio C Hamano | b78d259 | 2008-04-09 09:39:08 | [diff] [blame] | 792 | <li> |
| 793 | <p> |
Junio C Hamano | a9701f0 | 2010-01-21 00:42:16 | [diff] [blame] | 794 | <em>%%</em>: a raw <em>%</em> |
| 795 | </p> |
| 796 | </li> |
| 797 | <li> |
| 798 | <p> |
Junio C Hamano | b78d259 | 2008-04-09 09:39:08 | [diff] [blame] | 799 | <em>%x00</em>: print a byte from a hex code |
| 800 | </p> |
| 801 | </li> |
Junio C Hamano | bf984de | 2009-11-23 06:11:19 | [diff] [blame] | 802 | <li> |
| 803 | <p> |
| 804 | <em>%w([<w>[,<i1>[,<i2>]]])</em>: switch line wrapping, like the -w option of |
Junio C Hamano | 5706e0b | 2009-11-24 10:54:16 | [diff] [blame] | 805 | <a href="git-shortlog.html">git-shortlog(1)</a>. |
Junio C Hamano | bf984de | 2009-11-23 06:11:19 | [diff] [blame] | 806 | </p> |
| 807 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 808 | </ul></div> |
Junio C Hamano | 86bcccc | 2008-03-08 09:33:55 | [diff] [blame] | 809 | </li> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 810 | </ul></div> |
| 811 | <div class="admonitionblock"> |
| 812 | <table><tr> |
| 813 | <td class="icon"> |
| 814 | <div class="title">Note</div> |
| 815 | </td> |
| 816 | <td class="content">Some placeholders may depend on other options given to the |
| 817 | revision traversal engine. For example, the <tt>%g*</tt> reflog options will |
| 818 | insert an empty string unless we are traversing reflog entries (e.g., by |
| 819 | <tt>git log -g</tt>). The <tt>%d</tt> placeholder will use the "short" decoration |
| 820 | format if <tt>--decorate</tt> was not already provided on the command line.</td> |
| 821 | </tr></table> |
| 822 | </div> |
Junio C Hamano | 2bd8a74 | 2009-12-01 21:16:59 | [diff] [blame] | 823 | <div class="para"><p>If you add a <tt>+</tt> (plus sign) after <em>%</em> of a placeholder, a line-feed |
| 824 | is inserted immediately before the expansion if and only if the |
| 825 | placeholder expands to a non-empty string.</p></div> |
| 826 | <div class="para"><p>If you add a <tt>-</tt> (minus sign) after <em>%</em> of a placeholder, line-feeds that |
| 827 | immediately precede the expansion are deleted if and only if the |
| 828 | placeholder expands to an empty string.</p></div> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 829 | <div class="ilist"><ul> |
Junio C Hamano | 6fb124c | 2008-06-13 10:04:01 | [diff] [blame] | 830 | <li> |
| 831 | <p> |
| 832 | <em>tformat:</em> |
| 833 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 834 | <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] | 835 | provides "terminator" semantics instead of "separator" semantics. In |
| 836 | other words, each commit has the message terminator character (usually a |
| 837 | newline) appended, rather than a separator placed between entries. |
| 838 | This means that the final entry of a single-line format will be properly |
| 839 | terminated with a new line, just as the "oneline" format does. |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 840 | For example:</p></div> |
Junio C Hamano | 6fb124c | 2008-06-13 10:04:01 | [diff] [blame] | 841 | <div class="listingblock"> |
| 842 | <div class="content"> |
| 843 | <pre><tt>$ git log -2 --pretty=format:%h 4da45bef \ |
| 844 | | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/' |
| 845 | 4da45be |
| 846 | 7134973 -- NO NEWLINE |
| 847 | |
| 848 | $ git log -2 --pretty=tformat:%h 4da45bef \ |
| 849 | | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/' |
| 850 | 4da45be |
| 851 | 7134973</tt></pre> |
| 852 | </div></div> |
Junio C Hamano | 0a23522 | 2009-03-06 08:21:09 | [diff] [blame] | 853 | <div class="para"><p>In addition, any unrecognized string that has a <tt>%</tt> in it is interpreted |
| 854 | as if it has <tt>tformat:</tt> in front of it. For example, these two are |
| 855 | equivalent:</p></div> |
| 856 | <div class="listingblock"> |
| 857 | <div class="content"> |
| 858 | <pre><tt>$ git log -2 --pretty=tformat:%h 4da45bef |
| 859 | $ git log -2 --pretty=%h 4da45bef</tt></pre> |
| 860 | </div></div> |
Junio C Hamano | 6fb124c | 2008-06-13 10:04:01 | [diff] [blame] | 861 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 862 | </ul></div> |
Junio C Hamano | 86bcccc | 2008-03-08 09:33:55 | [diff] [blame] | 863 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 864 | <h2 id="_examples">Examples</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 865 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 866 | <div class="vlist"><dl> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 867 | <dt> |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 868 | git whatchanged -p v2.6.12.. include/scsi drivers/scsi |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 869 | </dt> |
| 870 | <dd> |
| 871 | <p> |
| 872 | Show as patches the commits since version <em>v2.6.12</em> that changed |
| 873 | any file in the include/scsi or drivers/scsi subdirectories |
| 874 | </p> |
| 875 | </dd> |
| 876 | <dt> |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 877 | git whatchanged --since="2 weeks ago" -- gitk |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 878 | </dt> |
| 879 | <dd> |
| 880 | <p> |
| 881 | Show the changes during the last two weeks to the file <em>gitk</em>. |
| 882 | The "--" is necessary to avoid confusion with the <strong>branch</strong> named |
| 883 | <em>gitk</em> |
| 884 | </p> |
| 885 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 886 | </dl></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 887 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 888 | <h2 id="_author">Author</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 889 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 890 | <div class="para"><p>Written by Linus Torvalds <torvalds@osdl.org> and |
Junio C Hamano | 0868a30 | 2008-07-22 09:20:44 | [diff] [blame] | 891 | Junio C Hamano <gitster@pobox.com></p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 892 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 893 | <h2 id="_documentation">Documentation</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 894 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 895 | <div class="para"><p>Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 896 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 897 | <h2 id="_git">GIT</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 898 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 899 | <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] | 900 | </div> |
| 901 | <div id="footer"> |
| 902 | <div id="footer-text"> |
Junio C Hamano | dca3482 | 2010-02-13 01:02:52 | [diff] [blame] | 903 | Last updated 2010-02-13 01:00:00 UTC |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 904 | </div> |
| 905 | </div> |
| 906 | </body> |
| 907 | </html> |