| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [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 | d9d71c0 | 2006-02-08 00:52:33 | [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 | d9d71c0 | 2006-02-08 00:52:33 | [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 | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 48 | border-bottom: 2px solid silver; |
| 49 | } |
| 50 | h2 { |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [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 | d9d71c0 | 2006-02-08 00:52:33 | [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 | d9d71c0 | 2006-02-08 00:52:33 | [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 | d9d71c0 | 2006-02-08 00:52:33 | [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 | d9d71c0 | 2006-02-08 00:52:33 | [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 | d9d71c0 | 2006-02-08 00:52:33 | [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 | d9d71c0 | 2006-02-08 00:52:33 | [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 | d9d71c0 | 2006-02-08 00:52:33 | [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 | d9d71c0 | 2006-02-08 00:52:33 | [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 | d9d71c0 | 2006-02-08 00:52:33 | [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 | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 306 | </style> |
| 307 | <title>git-show(1)</title> |
| 308 | </head> |
| 309 | <body> |
| 310 | <div id="header"> |
| 311 | <h1> |
| 312 | git-show(1) Manual Page |
| 313 | </h1> |
| 314 | <h2>NAME</h2> |
| 315 | <div class="sectionbody"> |
| 316 | <p>git-show - |
| Junio C Hamano | 7d23f5e | 2006-12-16 07:44:04 | [diff] [blame] | 317 | Show various types of objects |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [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 show</em> [options] <object>…</p></div> |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [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 | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 326 | <div class="sectionbody"> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 327 | <div class="para"><p>Shows one or more objects (blobs, trees, tags and commits).</p></div> |
| 328 | <div class="para"><p>For commits it shows the log message and textual diff. It also |
| Junio C Hamano | 7d23f5e | 2006-12-16 07:44:04 | [diff] [blame] | 329 | presents the merge commit in a special format as produced by |
| Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 330 | <em>git diff-tree --cc</em>.</p></div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 331 | <div class="para"><p>For tags, it shows the tag message and the referenced objects.</p></div> |
| Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 332 | <div class="para"><p>For trees, it shows the names (equivalent to <em>git ls-tree</em> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 333 | with --name-only).</p></div> |
| 334 | <div class="para"><p>For plain blobs, it shows the plain contents.</p></div> |
| Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 335 | <div class="para"><p>The command takes options applicable to the <em>git diff-tree</em> command to |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 336 | control how the changes the commit introduces are shown.</p></div> |
| 337 | <div class="para"><p>This manual page describes only the most frequently used options.</p></div> |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 338 | </div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 339 | <h2 id="_options">OPTIONS</h2> |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 340 | <div class="sectionbody"> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 341 | <div class="vlist"><dl> |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 342 | <dt> |
| Junio C Hamano | 9e39507 | 2008-07-31 22:11:21 | [diff] [blame] | 343 | <object>… |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 344 | </dt> |
| 345 | <dd> |
| 346 | <p> |
| Junio C Hamano | 9e39507 | 2008-07-31 22:11:21 | [diff] [blame] | 347 | The names of objects to show. |
| Junio C Hamano | 2d47c62 | 2007-01-18 06:24:10 | [diff] [blame] | 348 | For a more complete list of ways to spell object names, see |
| 349 | "SPECIFYING REVISIONS" section in <a href="git-rev-parse.html">git-rev-parse(1)</a>. |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 350 | </p> |
| 351 | </dd> |
| 352 | <dt> |
| Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 353 | --pretty[=<em><format></em>] |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 354 | </dt> |
| Junio C Hamano | 0a23522 | 2009-03-06 08:21:09 | [diff] [blame] | 355 | <dt> |
| 356 | --format[=<em><format></em>] |
| 357 | </dt> |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 358 | <dd> |
| 359 | <p> |
| Junio C Hamano | a3770f9 | 2007-07-25 08:53:33 | [diff] [blame] | 360 | Pretty-print the contents of the commit logs in a given format, |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 361 | where <em><format></em> can be one of <em>oneline</em>, <em>short</em>, <em>medium</em>, |
| 362 | <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] | 363 | When omitted, the format defaults to <em>medium</em>. |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 364 | </p> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 365 | <div class="para"><p>Note: you can specify the default pretty format in the repository |
| 366 | configuration (see <a href="git-config.html">git-config(1)</a>).</p></div> |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 367 | </dd> |
| 368 | <dt> |
| Junio C Hamano | ee695f2 | 2007-06-21 00:35:36 | [diff] [blame] | 369 | --abbrev-commit |
| 370 | </dt> |
| 371 | <dd> |
| 372 | <p> |
| 373 | Instead of showing the full 40-byte hexadecimal commit object |
| Junio C Hamano | 6efe302 | 2009-01-13 16:47:56 | [diff] [blame] | 374 | name, show only a partial prefix. Non default number of |
| Junio C Hamano | ee695f2 | 2007-06-21 00:35:36 | [diff] [blame] | 375 | digits can be specified with "--abbrev=<n>" (which also modifies |
| 376 | diff output, if it is displayed). |
| 377 | </p> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 378 | <div class="para"><p>This should make "--pretty=oneline" a whole lot more readable for |
| 379 | people using 80-column terminals.</p></div> |
| Junio C Hamano | ee695f2 | 2007-06-21 00:35:36 | [diff] [blame] | 380 | </dd> |
| 381 | <dt> |
| Junio C Hamano | 0a23522 | 2009-03-06 08:21:09 | [diff] [blame] | 382 | --oneline |
| 383 | </dt> |
| 384 | <dd> |
| 385 | <p> |
| 386 | This is a shorthand for "--pretty=oneline --abbrev-commit" |
| 387 | used together. |
| 388 | </p> |
| 389 | </dd> |
| 390 | <dt> |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 391 | --encoding[=<encoding>] |
| 392 | </dt> |
| 393 | <dd> |
| 394 | <p> |
| 395 | The commit objects record the encoding used for the log message |
| 396 | in their encoding header; this option can be used to tell the |
| 397 | command to re-code the commit log message in the encoding |
| 398 | preferred by the user. For non plumbing commands this |
| 399 | defaults to UTF-8. |
| 400 | </p> |
| 401 | </dd> |
| Junio C Hamano | 57827fb | 2010-01-23 03:02:50 | [diff] [blame] | 402 | <dt> |
| 403 | --no-notes |
| 404 | </dt> |
| 405 | <dt> |
| Junio C Hamano | 3166736 | 2010-03-25 00:38:53 | [diff] [blame] | 406 | --show-notes[=<ref>] |
| Junio C Hamano | 57827fb | 2010-01-23 03:02:50 | [diff] [blame] | 407 | </dt> |
| 408 | <dd> |
| 409 | <p> |
| 410 | Show the notes (see <a href="git-notes.html">git-notes(1)</a>) that annotate the |
| 411 | commit, when showing the commit log message. This is the default |
| 412 | for <tt>git log</tt>, <tt>git show</tt> and <tt>git whatchanged</tt> commands when |
| 413 | there is no <tt>--pretty</tt>, <tt>--format</tt> nor <tt>--oneline</tt> option is |
| 414 | given on the command line. |
| 415 | </p> |
| Junio C Hamano | 3166736 | 2010-03-25 00:38:53 | [diff] [blame] | 416 | <div class="para"><p>With an optional argument, add this ref to the list of notes. The ref |
| 417 | is taken to be in <tt>refs/notes/</tt> if it is not qualified.</p></div> |
| 418 | </dd> |
| 419 | <dt> |
| 420 | --[no-]standard-notes |
| 421 | </dt> |
| 422 | <dd> |
| 423 | <p> |
| 424 | Enable or disable populating the notes ref list from the |
| 425 | <em>core.notesRef</em> and <em>notes.displayRef</em> variables (or |
| 426 | corresponding environment overrides). Enabled by default. |
| 427 | See <a href="git-config.html">git-config(1)</a>. |
| 428 | </p> |
| Junio C Hamano | 57827fb | 2010-01-23 03:02:50 | [diff] [blame] | 429 | </dd> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 430 | </dl></div> |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 431 | </div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 432 | <h2 id="_pretty_formats">PRETTY FORMATS</h2> |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 433 | <div class="sectionbody"> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 434 | <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] | 435 | is not <em>oneline</em>, <em>email</em> or <em>raw</em>, an additional line is |
| 436 | inserted before the <em>Author:</em> line. This line begins with |
| 437 | "Merge: " and the sha1s of ancestral commits are printed, |
| 438 | separated by spaces. Note that the listed commits may not |
| 439 | necessarily be the list of the <strong>direct</strong> parent commits if you |
| 440 | have limited your view of history: for example, if you are |
| 441 | only interested in changes related to a certain directory or |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 442 | file.</p></div> |
| 443 | <div class="para"><p>Here are some additional details for each format:</p></div> |
| 444 | <div class="ilist"><ul> |
| Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 445 | <li> |
| 446 | <p> |
| 447 | <em>oneline</em> |
| 448 | </p> |
| 449 | <div class="literalblock"> |
| 450 | <div class="content"> |
| 451 | <pre><tt><sha1> <title line></tt></pre> |
| 452 | </div></div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 453 | <div class="para"><p>This is designed to be as compact as possible.</p></div> |
| Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 454 | </li> |
| 455 | <li> |
| 456 | <p> |
| 457 | <em>short</em> |
| 458 | </p> |
| 459 | <div class="literalblock"> |
| 460 | <div class="content"> |
| 461 | <pre><tt>commit <sha1> |
| 462 | Author: <author></tt></pre> |
| 463 | </div></div> |
| 464 | <div class="literalblock"> |
| 465 | <div class="content"> |
| 466 | <pre><tt><title line></tt></pre> |
| 467 | </div></div> |
| 468 | </li> |
| 469 | <li> |
| 470 | <p> |
| 471 | <em>medium</em> |
| 472 | </p> |
| 473 | <div class="literalblock"> |
| 474 | <div class="content"> |
| 475 | <pre><tt>commit <sha1> |
| 476 | Author: <author> |
| Junio C Hamano | 6a3c827 | 2008-12-19 21:38:18 | [diff] [blame] | 477 | Date: <author date></tt></pre> |
| Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 478 | </div></div> |
| 479 | <div class="literalblock"> |
| 480 | <div class="content"> |
| 481 | <pre><tt><title line></tt></pre> |
| 482 | </div></div> |
| 483 | <div class="literalblock"> |
| 484 | <div class="content"> |
| 485 | <pre><tt><full commit message></tt></pre> |
| 486 | </div></div> |
| 487 | </li> |
| 488 | <li> |
| 489 | <p> |
| 490 | <em>full</em> |
| 491 | </p> |
| 492 | <div class="literalblock"> |
| 493 | <div class="content"> |
| 494 | <pre><tt>commit <sha1> |
| 495 | Author: <author> |
| 496 | Commit: <committer></tt></pre> |
| 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>fuller</em> |
| 510 | </p> |
| 511 | <div class="literalblock"> |
| 512 | <div class="content"> |
| 513 | <pre><tt>commit <sha1> |
| Junio C Hamano | 6a3c827 | 2008-12-19 21:38:18 | [diff] [blame] | 514 | Author: <author> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 515 | AuthorDate: <author date> |
| Junio C Hamano | 6a3c827 | 2008-12-19 21:38:18 | [diff] [blame] | 516 | Commit: <committer> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 517 | CommitDate: <committer date></tt></pre> |
| Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 518 | </div></div> |
| 519 | <div class="literalblock"> |
| 520 | <div class="content"> |
| 521 | <pre><tt><title line></tt></pre> |
| 522 | </div></div> |
| 523 | <div class="literalblock"> |
| 524 | <div class="content"> |
| 525 | <pre><tt><full commit message></tt></pre> |
| 526 | </div></div> |
| 527 | </li> |
| 528 | <li> |
| 529 | <p> |
| 530 | <em>email</em> |
| 531 | </p> |
| 532 | <div class="literalblock"> |
| 533 | <div class="content"> |
| 534 | <pre><tt>From <sha1> <date> |
| 535 | From: <author> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 536 | Date: <author date> |
| Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 537 | Subject: [PATCH] <title line></tt></pre> |
| 538 | </div></div> |
| 539 | <div class="literalblock"> |
| 540 | <div class="content"> |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 541 | <pre><tt><full commit message></tt></pre> |
| Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 542 | </div></div> |
| 543 | </li> |
| 544 | <li> |
| 545 | <p> |
| 546 | <em>raw</em> |
| 547 | </p> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 548 | <div class="para"><p>The <em>raw</em> format shows the entire commit exactly as |
| Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 549 | stored in the commit object. Notably, the SHA1s are |
| 550 | displayed in full, regardless of whether --abbrev or |
| 551 | --no-abbrev are used, and <em>parents</em> information show the |
| 552 | true parent commits, without taking grafts nor history |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 553 | simplification into account.</p></div> |
| Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 554 | </li> |
| Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 555 | <li> |
| 556 | <p> |
| 557 | <em>format:</em> |
| 558 | </p> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 559 | <div class="para"><p>The <em>format:</em> format allows you to specify which information |
| Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 560 | you want to show. It works a little bit like printf format, |
| 561 | 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] | 562 | instead of <em>\n</em>.</p></div> |
| 563 | <div class="para"><p>E.g, <em>format:"The author of %h was %an, %ar%nThe title was >>%s<<%n"</em> |
| 564 | would show something like this:</p></div> |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 565 | <div class="listingblock"> |
| 566 | <div class="content"> |
| 567 | <pre><tt>The author of fe6e0ee was Junio C Hamano, 23 hours ago |
| 568 | The title was >>t4119: test autocomputing -p<n> for traditional diff input.<< |
| 569 | </tt></pre> |
| 570 | </div></div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 571 | <div class="para"><p>The placeholders are:</p></div> |
| 572 | <div class="ilist"><ul> |
| Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 573 | <li> |
| 574 | <p> |
| 575 | <em>%H</em>: commit hash |
| 576 | </p> |
| 577 | </li> |
| 578 | <li> |
| 579 | <p> |
| 580 | <em>%h</em>: abbreviated commit hash |
| 581 | </p> |
| 582 | </li> |
| 583 | <li> |
| 584 | <p> |
| 585 | <em>%T</em>: tree hash |
| 586 | </p> |
| 587 | </li> |
| 588 | <li> |
| 589 | <p> |
| 590 | <em>%t</em>: abbreviated tree hash |
| 591 | </p> |
| 592 | </li> |
| 593 | <li> |
| 594 | <p> |
| 595 | <em>%P</em>: parent hashes |
| 596 | </p> |
| 597 | </li> |
| 598 | <li> |
| 599 | <p> |
| 600 | <em>%p</em>: abbreviated parent hashes |
| 601 | </p> |
| 602 | </li> |
| 603 | <li> |
| 604 | <p> |
| 605 | <em>%an</em>: author name |
| 606 | </p> |
| 607 | </li> |
| 608 | <li> |
| 609 | <p> |
| Junio C Hamano | 8bc410e | 2009-02-15 10:38:19 | [diff] [blame] | 610 | <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] | 611 | </p> |
| 612 | </li> |
| 613 | <li> |
| 614 | <p> |
| Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 615 | <em>%ae</em>: author email |
| 616 | </p> |
| 617 | </li> |
| 618 | <li> |
| 619 | <p> |
| Junio C Hamano | 8bc410e | 2009-02-15 10:38:19 | [diff] [blame] | 620 | <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>) |
| 621 | </p> |
| 622 | </li> |
| 623 | <li> |
| 624 | <p> |
| Junio C Hamano | a387df3 | 2008-08-29 08:56:58 | [diff] [blame] | 625 | <em>%ad</em>: author date (format respects --date= option) |
| Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 626 | </p> |
| 627 | </li> |
| 628 | <li> |
| 629 | <p> |
| 630 | <em>%aD</em>: author date, RFC2822 style |
| 631 | </p> |
| 632 | </li> |
| 633 | <li> |
| 634 | <p> |
| 635 | <em>%ar</em>: author date, relative |
| 636 | </p> |
| 637 | </li> |
| 638 | <li> |
| 639 | <p> |
| 640 | <em>%at</em>: author date, UNIX timestamp |
| 641 | </p> |
| 642 | </li> |
| 643 | <li> |
| 644 | <p> |
| Junio C Hamano | 02f130b | 2007-07-14 08:26:56 | [diff] [blame] | 645 | <em>%ai</em>: author date, ISO 8601 format |
| 646 | </p> |
| 647 | </li> |
| 648 | <li> |
| 649 | <p> |
| Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 650 | <em>%cn</em>: committer name |
| 651 | </p> |
| 652 | </li> |
| 653 | <li> |
| 654 | <p> |
| Junio C Hamano | 8bc410e | 2009-02-15 10:38:19 | [diff] [blame] | 655 | <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] | 656 | </p> |
| 657 | </li> |
| 658 | <li> |
| 659 | <p> |
| Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 660 | <em>%ce</em>: committer email |
| 661 | </p> |
| 662 | </li> |
| 663 | <li> |
| 664 | <p> |
| Junio C Hamano | 8bc410e | 2009-02-15 10:38:19 | [diff] [blame] | 665 | <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>) |
| 666 | </p> |
| 667 | </li> |
| 668 | <li> |
| 669 | <p> |
| Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 670 | <em>%cd</em>: committer date |
| 671 | </p> |
| 672 | </li> |
| 673 | <li> |
| 674 | <p> |
| 675 | <em>%cD</em>: committer date, RFC2822 style |
| 676 | </p> |
| 677 | </li> |
| 678 | <li> |
| 679 | <p> |
| 680 | <em>%cr</em>: committer date, relative |
| 681 | </p> |
| 682 | </li> |
| 683 | <li> |
| 684 | <p> |
| 685 | <em>%ct</em>: committer date, UNIX timestamp |
| 686 | </p> |
| 687 | </li> |
| 688 | <li> |
| 689 | <p> |
| Junio C Hamano | 02f130b | 2007-07-14 08:26:56 | [diff] [blame] | 690 | <em>%ci</em>: committer date, ISO 8601 format |
| 691 | </p> |
| 692 | </li> |
| 693 | <li> |
| 694 | <p> |
| Junio C Hamano | 5e4d8de | 2008-09-19 06:27:02 | [diff] [blame] | 695 | <em>%d</em>: ref names, like the --decorate option of <a href="git-log.html">git-log(1)</a> |
| 696 | </p> |
| 697 | </li> |
| 698 | <li> |
| 699 | <p> |
| Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 700 | <em>%e</em>: encoding |
| 701 | </p> |
| 702 | </li> |
| 703 | <li> |
| 704 | <p> |
| 705 | <em>%s</em>: subject |
| 706 | </p> |
| 707 | </li> |
| 708 | <li> |
| 709 | <p> |
| Junio C Hamano | 5f9a6f0 | 2009-04-06 08:26:56 | [diff] [blame] | 710 | <em>%f</em>: sanitized subject line, suitable for a filename |
| 711 | </p> |
| 712 | </li> |
| 713 | <li> |
| 714 | <p> |
| Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 715 | <em>%b</em>: body |
| 716 | </p> |
| 717 | </li> |
| 718 | <li> |
| 719 | <p> |
| Junio C Hamano | cb39aea | 2010-05-09 07:24:48 | [diff] [blame^] | 720 | <em>%B</em>: raw body (unwrapped subject and body) |
| 721 | </p> |
| 722 | </li> |
| 723 | <li> |
| 724 | <p> |
| Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 725 | <em>%N</em>: commit notes |
| 726 | </p> |
| 727 | </li> |
| 728 | <li> |
| 729 | <p> |
| Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 730 | <em>%gD</em>: reflog selector, e.g., <tt>refs/stash@{1}</tt> |
| 731 | </p> |
| 732 | </li> |
| 733 | <li> |
| 734 | <p> |
| 735 | <em>%gd</em>: shortened reflog selector, e.g., <tt>stash@{1}</tt> |
| 736 | </p> |
| 737 | </li> |
| 738 | <li> |
| 739 | <p> |
| 740 | <em>%gs</em>: reflog subject |
| 741 | </p> |
| 742 | </li> |
| 743 | <li> |
| 744 | <p> |
| Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 745 | <em>%Cred</em>: switch color to red |
| 746 | </p> |
| 747 | </li> |
| 748 | <li> |
| 749 | <p> |
| 750 | <em>%Cgreen</em>: switch color to green |
| 751 | </p> |
| 752 | </li> |
| 753 | <li> |
| 754 | <p> |
| 755 | <em>%Cblue</em>: switch color to blue |
| 756 | </p> |
| 757 | </li> |
| 758 | <li> |
| 759 | <p> |
| 760 | <em>%Creset</em>: reset color |
| 761 | </p> |
| 762 | </li> |
| 763 | <li> |
| 764 | <p> |
| Junio C Hamano | cc0cb31 | 2009-01-22 03:38:50 | [diff] [blame] | 765 | <em>%C(…)</em>: color specification, as described in color.branch.* config option |
| 766 | </p> |
| 767 | </li> |
| 768 | <li> |
| 769 | <p> |
| Junio C Hamano | d9e0e5d | 2007-04-14 16:22:04 | [diff] [blame] | 770 | <em>%m</em>: left, right or boundary mark |
| 771 | </p> |
| 772 | </li> |
| 773 | <li> |
| 774 | <p> |
| Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 775 | <em>%n</em>: newline |
| 776 | </p> |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 777 | </li> |
| Junio C Hamano | b78d259 | 2008-04-09 09:39:08 | [diff] [blame] | 778 | <li> |
| 779 | <p> |
| Junio C Hamano | a9701f0 | 2010-01-21 00:42:16 | [diff] [blame] | 780 | <em>%%</em>: a raw <em>%</em> |
| 781 | </p> |
| 782 | </li> |
| 783 | <li> |
| 784 | <p> |
| Junio C Hamano | b78d259 | 2008-04-09 09:39:08 | [diff] [blame] | 785 | <em>%x00</em>: print a byte from a hex code |
| 786 | </p> |
| 787 | </li> |
| Junio C Hamano | bf984de | 2009-11-23 06:11:19 | [diff] [blame] | 788 | <li> |
| 789 | <p> |
| 790 | <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] | 791 | <a href="git-shortlog.html">git-shortlog(1)</a>. |
| Junio C Hamano | bf984de | 2009-11-23 06:11:19 | [diff] [blame] | 792 | </p> |
| 793 | </li> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 794 | </ul></div> |
| Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 795 | </li> |
| Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 796 | </ul></div> |
| 797 | <div class="admonitionblock"> |
| 798 | <table><tr> |
| 799 | <td class="icon"> |
| 800 | <div class="title">Note</div> |
| 801 | </td> |
| 802 | <td class="content">Some placeholders may depend on other options given to the |
| 803 | revision traversal engine. For example, the <tt>%g*</tt> reflog options will |
| 804 | insert an empty string unless we are traversing reflog entries (e.g., by |
| 805 | <tt>git log -g</tt>). The <tt>%d</tt> placeholder will use the "short" decoration |
| 806 | format if <tt>--decorate</tt> was not already provided on the command line.</td> |
| 807 | </tr></table> |
| 808 | </div> |
| Junio C Hamano | 2bd8a74 | 2009-12-01 21:16:59 | [diff] [blame] | 809 | <div class="para"><p>If you add a <tt>+</tt> (plus sign) after <em>%</em> of a placeholder, a line-feed |
| 810 | is inserted immediately before the expansion if and only if the |
| 811 | placeholder expands to a non-empty string.</p></div> |
| 812 | <div class="para"><p>If you add a <tt>-</tt> (minus sign) after <em>%</em> of a placeholder, line-feeds that |
| 813 | immediately precede the expansion are deleted if and only if the |
| 814 | placeholder expands to an empty string.</p></div> |
| Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 815 | <div class="ilist"><ul> |
| Junio C Hamano | 6fb124c | 2008-06-13 10:04:01 | [diff] [blame] | 816 | <li> |
| 817 | <p> |
| 818 | <em>tformat:</em> |
| 819 | </p> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 820 | <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] | 821 | provides "terminator" semantics instead of "separator" semantics. In |
| 822 | other words, each commit has the message terminator character (usually a |
| 823 | newline) appended, rather than a separator placed between entries. |
| 824 | This means that the final entry of a single-line format will be properly |
| 825 | terminated with a new line, just as the "oneline" format does. |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 826 | For example:</p></div> |
| Junio C Hamano | 6fb124c | 2008-06-13 10:04:01 | [diff] [blame] | 827 | <div class="listingblock"> |
| 828 | <div class="content"> |
| 829 | <pre><tt>$ git log -2 --pretty=format:%h 4da45bef \ |
| 830 | | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/' |
| 831 | 4da45be |
| 832 | 7134973 -- NO NEWLINE |
| 833 | |
| 834 | $ git log -2 --pretty=tformat:%h 4da45bef \ |
| 835 | | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/' |
| 836 | 4da45be |
| 837 | 7134973</tt></pre> |
| 838 | </div></div> |
| Junio C Hamano | 0a23522 | 2009-03-06 08:21:09 | [diff] [blame] | 839 | <div class="para"><p>In addition, any unrecognized string that has a <tt>%</tt> in it is interpreted |
| 840 | as if it has <tt>tformat:</tt> in front of it. For example, these two are |
| 841 | equivalent:</p></div> |
| 842 | <div class="listingblock"> |
| 843 | <div class="content"> |
| 844 | <pre><tt>$ git log -2 --pretty=tformat:%h 4da45bef |
| 845 | $ git log -2 --pretty=%h 4da45bef</tt></pre> |
| 846 | </div></div> |
| Junio C Hamano | 6fb124c | 2008-06-13 10:04:01 | [diff] [blame] | 847 | </li> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 848 | </ul></div> |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 849 | </div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 850 | <h2 id="_examples">EXAMPLES</h2> |
| Junio C Hamano | 7d23f5e | 2006-12-16 07:44:04 | [diff] [blame] | 851 | <div class="sectionbody"> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 852 | <div class="vlist"><dl> |
| Junio C Hamano | 7d23f5e | 2006-12-16 07:44:04 | [diff] [blame] | 853 | <dt> |
| 854 | git show v1.0.0 |
| 855 | </dt> |
| 856 | <dd> |
| 857 | <p> |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 858 | Shows the tag <tt>v1.0.0</tt>, along with the object the tags |
| 859 | points at. |
| Junio C Hamano | 7d23f5e | 2006-12-16 07:44:04 | [diff] [blame] | 860 | </p> |
| 861 | </dd> |
| 862 | <dt> |
| Junio C Hamano | db911ee | 2007-02-28 08:13:52 | [diff] [blame] | 863 | git show v1.0.0^{tree} |
| Junio C Hamano | 7d23f5e | 2006-12-16 07:44:04 | [diff] [blame] | 864 | </dt> |
| 865 | <dd> |
| 866 | <p> |
| 867 | Shows the tree pointed to by the tag <tt>v1.0.0</tt>. |
| 868 | </p> |
| 869 | </dd> |
| Junio C Hamano | db911ee | 2007-02-28 08:13:52 | [diff] [blame] | 870 | <dt> |
| 871 | git show next~10:Documentation/README |
| 872 | </dt> |
| 873 | <dd> |
| 874 | <p> |
| Junio C Hamano | 7d23f5e | 2006-12-16 07:44:04 | [diff] [blame] | 875 | Shows the contents of the file <tt>Documentation/README</tt> as |
| 876 | they were current in the 10th last commit of the branch |
| Junio C Hamano | db911ee | 2007-02-28 08:13:52 | [diff] [blame] | 877 | <tt>next</tt>. |
| 878 | </p> |
| 879 | </dd> |
| 880 | <dt> |
| 881 | git show master:Makefile master:t/Makefile |
| 882 | </dt> |
| 883 | <dd> |
| 884 | <p> |
| Junio C Hamano | 7d23f5e | 2006-12-16 07:44:04 | [diff] [blame] | 885 | Concatenates the contents of said Makefiles in the head |
| Junio C Hamano | db911ee | 2007-02-28 08:13:52 | [diff] [blame] | 886 | of the branch <tt>master</tt>. |
| 887 | </p> |
| 888 | </dd> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 889 | </dl></div> |
| Junio C Hamano | 7d23f5e | 2006-12-16 07:44:04 | [diff] [blame] | 890 | </div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 891 | <h2 id="_discussion">Discussion</h2> |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 892 | <div class="sectionbody"> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 893 | <div class="para"><p>At the core level, git is character encoding agnostic.</p></div> |
| 894 | <div class="ilist"><ul> |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 895 | <li> |
| 896 | <p> |
| 897 | The pathnames recorded in the index and in the tree objects |
| 898 | are treated as uninterpreted sequences of non-NUL bytes. |
| 899 | What readdir(2) returns are what are recorded and compared |
| 900 | with the data git keeps track of, which in turn are expected |
| 901 | to be what lstat(2) and creat(2) accepts. There is no such |
| 902 | thing as pathname encoding translation. |
| 903 | </p> |
| 904 | </li> |
| 905 | <li> |
| 906 | <p> |
| Junio C Hamano | 54bf1e2 | 2008-12-20 06:30:11 | [diff] [blame] | 907 | The contents of the blob objects are uninterpreted sequences |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 908 | of bytes. There is no encoding translation at the core |
| 909 | level. |
| 910 | </p> |
| 911 | </li> |
| 912 | <li> |
| 913 | <p> |
| Junio C Hamano | 54bf1e2 | 2008-12-20 06:30:11 | [diff] [blame] | 914 | The commit log messages are uninterpreted sequences of non-NUL |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 915 | bytes. |
| 916 | </p> |
| 917 | </li> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 918 | </ul></div> |
| 919 | <div class="para"><p>Although we encourage that the commit log messages are encoded |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 920 | in UTF-8, both the core and git Porcelain are designed not to |
| 921 | force UTF-8 on projects. If all participants of a particular |
| 922 | project find it more convenient to use legacy encodings, git |
| 923 | does not forbid it. However, there are a few things to keep in |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 924 | mind.</p></div> |
| 925 | <div class="olist"><ol> |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 926 | <li> |
| 927 | <p> |
| Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 928 | <em>git commit</em> and <em>git commit-tree</em> issues |
| Junio C Hamano | 14b7648 | 2008-01-05 10:32:26 | [diff] [blame] | 929 | a warning if the commit log message given to it does not look |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 930 | like a valid UTF-8 string, unless you explicitly say your |
| 931 | project uses a legacy encoding. The way to say this is to |
| Junio C Hamano | 35bb3f6 | 2007-02-19 05:35:53 | [diff] [blame] | 932 | have i18n.commitencoding in <tt>.git/config</tt> file, like this: |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 933 | </p> |
| 934 | <div class="listingblock"> |
| 935 | <div class="content"> |
| Junio C Hamano | 35bb3f6 | 2007-02-19 05:35:53 | [diff] [blame] | 936 | <pre><tt>[i18n] |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 937 | commitencoding = ISO-8859-1</tt></pre> |
| 938 | </div></div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 939 | <div class="para"><p>Commit objects created with the above setting record the value |
| Junio C Hamano | 35bb3f6 | 2007-02-19 05:35:53 | [diff] [blame] | 940 | of <tt>i18n.commitencoding</tt> in its <tt>encoding</tt> header. This is to |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 941 | help other people who look at them later. Lack of this header |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 942 | implies that the commit log message is encoded in UTF-8.</p></div> |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 943 | </li> |
| 944 | <li> |
| 945 | <p> |
| Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 946 | <em>git log</em>, <em>git show</em>, <em>git blame</em> and friends look at the |
| Junio C Hamano | aa17c7c | 2008-11-03 04:36:58 | [diff] [blame] | 947 | <tt>encoding</tt> header of a commit object, and try to re-code the |
| 948 | log message into UTF-8 unless otherwise specified. You can |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 949 | specify the desired output encoding with |
| Junio C Hamano | 35bb3f6 | 2007-02-19 05:35:53 | [diff] [blame] | 950 | <tt>i18n.logoutputencoding</tt> in <tt>.git/config</tt> file, like this: |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 951 | </p> |
| 952 | <div class="listingblock"> |
| 953 | <div class="content"> |
| Junio C Hamano | 35bb3f6 | 2007-02-19 05:35:53 | [diff] [blame] | 954 | <pre><tt>[i18n] |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 955 | logoutputencoding = ISO-8859-1</tt></pre> |
| 956 | </div></div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 957 | <div class="para"><p>If you do not have this configuration variable, the value of |
| 958 | <tt>i18n.commitencoding</tt> is used instead.</p></div> |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 959 | </li> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 960 | </ol></div> |
| 961 | <div class="para"><p>Note that we deliberately chose not to re-code the commit log |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 962 | message when a commit is made to force UTF-8 at the commit |
| 963 | object level, because re-coding to UTF-8 is not necessarily a |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 964 | reversible operation.</p></div> |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 965 | </div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 966 | <h2 id="_author">Author</h2> |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 967 | <div class="sectionbody"> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 968 | <div class="para"><p>Written by Linus Torvalds <torvalds@osdl.org> and |
| Junio C Hamano | 0868a30 | 2008-07-22 09:20:44 | [diff] [blame] | 969 | Junio C Hamano <gitster@pobox.com>. Significantly enhanced by |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 970 | Johannes Schindelin <Johannes.Schindelin@gmx.de>.</p></div> |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 971 | </div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 972 | <h2 id="_documentation">Documentation</h2> |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 973 | <div class="sectionbody"> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 974 | <div class="para"><p>Documentation by David Greaves, Petr Baudis and the git-list <git@vger.kernel.org>.</p></div> |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 975 | </div> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 976 | <h2 id="_git">GIT</h2> |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 977 | <div class="sectionbody"> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 978 | <div class="para"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 979 | </div> |
| 980 | <div id="footer"> |
| 981 | <div id="footer-text"> |
| Junio C Hamano | cb39aea | 2010-05-09 07:24:48 | [diff] [blame^] | 982 | Last updated 2010-05-09 07:24:21 UTC |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 983 | </div> |
| 984 | </div> |
| 985 | </body> |
| 986 | </html> |