| 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> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 5 | <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" /> |
| 6 | <meta name="generator" content="AsciiDoc 8.6.8" /> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 7 | <title>git-show(1)</title> |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 8 | <style type="text/css"> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 9 | /* Shared CSS for AsciiDoc xhtml11 and html5 backends */ |
| 10 | |
| 11 | /* Default font. */ |
| 12 | body { |
| 13 | font-family: Georgia,serif; |
| 14 | } |
| 15 | |
| 16 | /* Title font. */ |
| 17 | h1, h2, h3, h4, h5, h6, |
| 18 | div.title, caption.title, |
| 19 | thead, p.table.header, |
| 20 | #toctitle, |
| 21 | #author, #revnumber, #revdate, #revremark, |
| 22 | #footer { |
| 23 | font-family: Arial,Helvetica,sans-serif; |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 24 | } |
| 25 | |
| 26 | body { |
| 27 | margin: 1em 5% 1em 5%; |
| 28 | } |
| 29 | |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 30 | a { |
| 31 | color: blue; |
| 32 | text-decoration: underline; |
| 33 | } |
| 34 | a:visited { |
| 35 | color: fuchsia; |
| 36 | } |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 37 | |
| 38 | em { |
| 39 | font-style: italic; |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 40 | color: navy; |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 41 | } |
| 42 | |
| 43 | strong { |
| 44 | font-weight: bold; |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 45 | color: #083194; |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 46 | } |
| 47 | |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 48 | h1, h2, h3, h4, h5, h6 { |
| 49 | color: #527bbd; |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 50 | margin-top: 1.2em; |
| 51 | margin-bottom: 0.5em; |
| 52 | line-height: 1.3; |
| 53 | } |
| 54 | |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 55 | h1, h2, h3 { |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 56 | border-bottom: 2px solid silver; |
| 57 | } |
| 58 | h2 { |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 59 | padding-top: 0.5em; |
| 60 | } |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 61 | h3 { |
| 62 | float: left; |
| 63 | } |
| 64 | h3 + * { |
| 65 | clear: left; |
| 66 | } |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 67 | h5 { |
| 68 | font-size: 1.0em; |
| 69 | } |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 70 | |
| 71 | div.sectionbody { |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 72 | margin-left: 0; |
| 73 | } |
| 74 | |
| 75 | hr { |
| 76 | border: 1px solid silver; |
| 77 | } |
| 78 | |
| 79 | p { |
| 80 | margin-top: 0.5em; |
| 81 | margin-bottom: 0.5em; |
| 82 | } |
| 83 | |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 84 | ul, ol, li > p { |
| 85 | margin-top: 0; |
| 86 | } |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 87 | ul > li { color: #aaa; } |
| 88 | ul > li > * { color: black; } |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 89 | |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 90 | .monospaced, code, pre { |
| 91 | font-family: "Courier New", Courier, monospace; |
| 92 | font-size: inherit; |
| 93 | color: navy; |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 94 | padding: 0; |
| 95 | margin: 0; |
| 96 | } |
| 97 | |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 98 | |
| 99 | #author { |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 100 | color: #527bbd; |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 101 | font-weight: bold; |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 102 | font-size: 1.1em; |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 103 | } |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 104 | #email { |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 105 | } |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 106 | #revnumber, #revdate, #revremark { |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 107 | } |
| 108 | |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 109 | #footer { |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 110 | font-size: small; |
| 111 | border-top: 2px solid silver; |
| 112 | padding-top: 0.5em; |
| 113 | margin-top: 4.0em; |
| 114 | } |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 115 | #footer-text { |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 116 | float: left; |
| 117 | padding-bottom: 0.5em; |
| 118 | } |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 119 | #footer-badges { |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 120 | float: right; |
| 121 | padding-bottom: 0.5em; |
| 122 | } |
| 123 | |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 124 | #preamble { |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 125 | margin-top: 1.5em; |
| 126 | margin-bottom: 1.5em; |
| 127 | } |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 128 | div.imageblock, div.exampleblock, div.verseblock, |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 129 | div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, |
| 130 | div.admonitionblock { |
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 131 | margin-top: 1.0em; |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 132 | margin-bottom: 1.5em; |
| 133 | } |
| 134 | div.admonitionblock { |
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 135 | margin-top: 2.0em; |
| 136 | margin-bottom: 2.0em; |
| 137 | margin-right: 10%; |
| 138 | color: #606060; |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 139 | } |
| 140 | |
| 141 | div.content { /* Block element content. */ |
| 142 | padding: 0; |
| 143 | } |
| 144 | |
| 145 | /* Block element titles. */ |
| 146 | div.title, caption.title { |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 147 | color: #527bbd; |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 148 | font-weight: bold; |
| 149 | text-align: left; |
| 150 | margin-top: 1.0em; |
| 151 | margin-bottom: 0.5em; |
| 152 | } |
| 153 | div.title + * { |
| 154 | margin-top: 0; |
| 155 | } |
| 156 | |
| 157 | td div.title:first-child { |
| 158 | margin-top: 0.0em; |
| 159 | } |
| 160 | div.content div.title:first-child { |
| 161 | margin-top: 0.0em; |
| 162 | } |
| 163 | div.content + div.title { |
| 164 | margin-top: 0.0em; |
| 165 | } |
| 166 | |
| 167 | div.sidebarblock > div.content { |
| 168 | background: #ffffee; |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 169 | border: 1px solid #dddddd; |
| 170 | border-left: 4px solid #f0f0f0; |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 171 | padding: 0.5em; |
| 172 | } |
| 173 | |
| 174 | div.listingblock > div.content { |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 175 | border: 1px solid #dddddd; |
| 176 | border-left: 5px solid #f0f0f0; |
| 177 | background: #f8f8f8; |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 178 | padding: 0.5em; |
| 179 | } |
| 180 | |
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 181 | div.quoteblock, div.verseblock { |
| 182 | padding-left: 1.0em; |
| 183 | margin-left: 1.0em; |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 184 | margin-right: 10%; |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 185 | border-left: 5px solid #f0f0f0; |
| 186 | color: #888; |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 187 | } |
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 188 | |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 189 | div.quoteblock > div.attribution { |
| 190 | padding-top: 0.5em; |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 191 | text-align: right; |
| 192 | } |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 193 | |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 194 | div.verseblock > pre.content { |
| 195 | font-family: inherit; |
| 196 | font-size: inherit; |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 197 | } |
| 198 | div.verseblock > div.attribution { |
| 199 | padding-top: 0.75em; |
| 200 | text-align: left; |
| 201 | } |
| 202 | /* DEPRECATED: Pre version 8.2.7 verse style literal block. */ |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 203 | div.verseblock + div.attribution { |
| 204 | text-align: left; |
| 205 | } |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 206 | |
| 207 | div.admonitionblock .icon { |
| 208 | vertical-align: top; |
| 209 | font-size: 1.1em; |
| 210 | font-weight: bold; |
| 211 | text-decoration: underline; |
| 212 | color: #527bbd; |
| 213 | padding-right: 0.5em; |
| 214 | } |
| 215 | div.admonitionblock td.content { |
| 216 | padding-left: 0.5em; |
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 217 | border-left: 3px solid #dddddd; |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 218 | } |
| 219 | |
| 220 | div.exampleblock > div.content { |
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 221 | border-left: 3px solid #dddddd; |
| 222 | padding-left: 0.5em; |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 223 | } |
| 224 | |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 225 | div.imageblock div.content { padding-left: 0; } |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 226 | span.image img { border-style: none; } |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 227 | a.image:visited { color: white; } |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 228 | |
| 229 | dl { |
| 230 | margin-top: 0.8em; |
| 231 | margin-bottom: 0.8em; |
| 232 | } |
| 233 | dt { |
| 234 | margin-top: 0.5em; |
| 235 | margin-bottom: 0; |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 236 | font-style: normal; |
| 237 | color: navy; |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 238 | } |
| 239 | dd > *:first-child { |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 240 | margin-top: 0.1em; |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 241 | } |
| 242 | |
| 243 | ul, ol { |
| 244 | list-style-position: outside; |
| 245 | } |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 246 | ol.arabic { |
| 247 | list-style-type: decimal; |
| 248 | } |
| 249 | ol.loweralpha { |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 250 | list-style-type: lower-alpha; |
| 251 | } |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 252 | ol.upperalpha { |
| 253 | list-style-type: upper-alpha; |
| 254 | } |
| 255 | ol.lowerroman { |
| 256 | list-style-type: lower-roman; |
| 257 | } |
| 258 | ol.upperroman { |
| 259 | list-style-type: upper-roman; |
| 260 | } |
| 261 | |
| 262 | div.compact ul, div.compact ol, |
| 263 | div.compact p, div.compact p, |
| 264 | div.compact div, div.compact div { |
| 265 | margin-top: 0.1em; |
| 266 | margin-bottom: 0.1em; |
| 267 | } |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 268 | |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 269 | tfoot { |
| 270 | font-weight: bold; |
| 271 | } |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 272 | td > div.verse { |
| 273 | white-space: pre; |
| 274 | } |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 275 | |
| 276 | div.hdlist { |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 277 | margin-top: 0.8em; |
| 278 | margin-bottom: 0.8em; |
| 279 | } |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 280 | div.hdlist tr { |
| 281 | padding-bottom: 15px; |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 282 | } |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 283 | dt.hdlist1.strong, td.hdlist1.strong { |
| 284 | font-weight: bold; |
| 285 | } |
| 286 | td.hdlist1 { |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 287 | vertical-align: top; |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 288 | font-style: normal; |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 289 | padding-right: 0.8em; |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 290 | color: navy; |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 291 | } |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 292 | td.hdlist2 { |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 293 | vertical-align: top; |
| 294 | } |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 295 | div.hdlist.compact tr { |
| 296 | margin: 0; |
| 297 | padding-bottom: 0; |
| 298 | } |
| 299 | |
| 300 | .comment { |
| 301 | background: yellow; |
| 302 | } |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 303 | |
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 304 | .footnote, .footnoteref { |
| 305 | font-size: 0.8em; |
| 306 | } |
| 307 | |
| 308 | span.footnote, span.footnoteref { |
| 309 | vertical-align: super; |
| 310 | } |
| 311 | |
| 312 | #footnotes { |
| 313 | margin: 20px 0 20px 0; |
| 314 | padding: 7px 0 0 0; |
| 315 | } |
| 316 | |
| 317 | #footnotes div.footnote { |
| 318 | margin: 0 0 5px 0; |
| 319 | } |
| 320 | |
| 321 | #footnotes hr { |
| 322 | border: none; |
| 323 | border-top: 1px solid silver; |
| 324 | height: 1px; |
| 325 | text-align: left; |
| 326 | margin-left: 0; |
| 327 | width: 20%; |
| 328 | min-width: 100px; |
| 329 | } |
| 330 | |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 331 | div.colist td { |
| 332 | padding-right: 0.5em; |
| 333 | padding-bottom: 0.3em; |
| 334 | vertical-align: top; |
| 335 | } |
| 336 | div.colist td img { |
| 337 | margin-top: 0.3em; |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 338 | } |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 339 | |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 340 | @media print { |
| 341 | #footer-badges { display: none; } |
| 342 | } |
| 343 | |
| 344 | #toc { |
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 345 | margin-bottom: 2.5em; |
| 346 | } |
| 347 | |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 348 | #toctitle { |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 349 | color: #527bbd; |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 350 | font-size: 1.1em; |
| 351 | font-weight: bold; |
| 352 | margin-top: 1.0em; |
| 353 | margin-bottom: 0.1em; |
| 354 | } |
| 355 | |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 356 | div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 357 | margin-top: 0; |
| 358 | margin-bottom: 0; |
| 359 | } |
| 360 | div.toclevel2 { |
| 361 | margin-left: 2em; |
| 362 | font-size: 0.9em; |
| 363 | } |
| 364 | div.toclevel3 { |
| 365 | margin-left: 4em; |
| 366 | font-size: 0.9em; |
| 367 | } |
| 368 | div.toclevel4 { |
| 369 | margin-left: 6em; |
| 370 | font-size: 0.9em; |
| 371 | } |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 372 | |
| 373 | span.aqua { color: aqua; } |
| 374 | span.black { color: black; } |
| 375 | span.blue { color: blue; } |
| 376 | span.fuchsia { color: fuchsia; } |
| 377 | span.gray { color: gray; } |
| 378 | span.green { color: green; } |
| 379 | span.lime { color: lime; } |
| 380 | span.maroon { color: maroon; } |
| 381 | span.navy { color: navy; } |
| 382 | span.olive { color: olive; } |
| 383 | span.purple { color: purple; } |
| 384 | span.red { color: red; } |
| 385 | span.silver { color: silver; } |
| 386 | span.teal { color: teal; } |
| 387 | span.white { color: white; } |
| 388 | span.yellow { color: yellow; } |
| 389 | |
| 390 | span.aqua-background { background: aqua; } |
| 391 | span.black-background { background: black; } |
| 392 | span.blue-background { background: blue; } |
| 393 | span.fuchsia-background { background: fuchsia; } |
| 394 | span.gray-background { background: gray; } |
| 395 | span.green-background { background: green; } |
| 396 | span.lime-background { background: lime; } |
| 397 | span.maroon-background { background: maroon; } |
| 398 | span.navy-background { background: navy; } |
| 399 | span.olive-background { background: olive; } |
| 400 | span.purple-background { background: purple; } |
| 401 | span.red-background { background: red; } |
| 402 | span.silver-background { background: silver; } |
| 403 | span.teal-background { background: teal; } |
| 404 | span.white-background { background: white; } |
| 405 | span.yellow-background { background: yellow; } |
| 406 | |
| 407 | span.big { font-size: 2em; } |
| 408 | span.small { font-size: 0.6em; } |
| 409 | |
| 410 | span.underline { text-decoration: underline; } |
| 411 | span.overline { text-decoration: overline; } |
| 412 | span.line-through { text-decoration: line-through; } |
| 413 | |
| 414 | div.unbreakable { page-break-inside: avoid; } |
| 415 | |
| 416 | |
| 417 | /* |
| 418 | * xhtml11 specific |
| 419 | * |
| 420 | * */ |
| 421 | |
| 422 | div.tableblock { |
| 423 | margin-top: 1.0em; |
| 424 | margin-bottom: 1.5em; |
| 425 | } |
| 426 | div.tableblock > table { |
| 427 | border: 3px solid #527bbd; |
| 428 | } |
| 429 | thead, p.table.header { |
| 430 | font-weight: bold; |
| 431 | color: #527bbd; |
| 432 | } |
| 433 | p.table { |
| 434 | margin-top: 0; |
| 435 | } |
| 436 | /* Because the table frame attribute is overriden by CSS in most browsers. */ |
| 437 | div.tableblock > table[frame="void"] { |
| 438 | border-style: none; |
| 439 | } |
| 440 | div.tableblock > table[frame="hsides"] { |
| 441 | border-left-style: none; |
| 442 | border-right-style: none; |
| 443 | } |
| 444 | div.tableblock > table[frame="vsides"] { |
| 445 | border-top-style: none; |
| 446 | border-bottom-style: none; |
| 447 | } |
| 448 | |
| 449 | |
| 450 | /* |
| 451 | * html5 specific |
| 452 | * |
| 453 | * */ |
| 454 | |
| 455 | table.tableblock { |
| 456 | margin-top: 1.0em; |
| 457 | margin-bottom: 1.5em; |
| 458 | } |
| 459 | thead, p.tableblock.header { |
| 460 | font-weight: bold; |
| 461 | color: #527bbd; |
| 462 | } |
| 463 | p.tableblock { |
| 464 | margin-top: 0; |
| 465 | } |
| 466 | table.tableblock { |
| 467 | border-width: 3px; |
| 468 | border-spacing: 0px; |
| 469 | border-style: solid; |
| 470 | border-color: #527bbd; |
| 471 | border-collapse: collapse; |
| 472 | } |
| 473 | th.tableblock, td.tableblock { |
| 474 | border-width: 1px; |
| 475 | padding: 4px; |
| 476 | border-style: solid; |
| 477 | border-color: #527bbd; |
| 478 | } |
| 479 | |
| 480 | table.tableblock.frame-topbot { |
| 481 | border-left-style: hidden; |
| 482 | border-right-style: hidden; |
| 483 | } |
| 484 | table.tableblock.frame-sides { |
| 485 | border-top-style: hidden; |
| 486 | border-bottom-style: hidden; |
| 487 | } |
| 488 | table.tableblock.frame-none { |
| 489 | border-style: hidden; |
| 490 | } |
| 491 | |
| 492 | th.tableblock.halign-left, td.tableblock.halign-left { |
| 493 | text-align: left; |
| 494 | } |
| 495 | th.tableblock.halign-center, td.tableblock.halign-center { |
| 496 | text-align: center; |
| 497 | } |
| 498 | th.tableblock.halign-right, td.tableblock.halign-right { |
| 499 | text-align: right; |
| 500 | } |
| 501 | |
| 502 | th.tableblock.valign-top, td.tableblock.valign-top { |
| 503 | vertical-align: top; |
| 504 | } |
| 505 | th.tableblock.valign-middle, td.tableblock.valign-middle { |
| 506 | vertical-align: middle; |
| 507 | } |
| 508 | th.tableblock.valign-bottom, td.tableblock.valign-bottom { |
| 509 | vertical-align: bottom; |
| 510 | } |
| 511 | |
| 512 | |
| 513 | /* |
| 514 | * manpage specific |
| 515 | * |
| 516 | * */ |
| 517 | |
| 518 | body.manpage h1 { |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 519 | padding-top: 0.5em; |
| 520 | padding-bottom: 0.5em; |
| 521 | border-top: 2px solid silver; |
| 522 | border-bottom: 2px solid silver; |
| 523 | } |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 524 | body.manpage h2 { |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 525 | border-style: none; |
| 526 | } |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 527 | body.manpage div.sectionbody { |
| 528 | margin-left: 3em; |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 529 | } |
| 530 | |
| 531 | @media print { |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 532 | body.manpage div#toc { display: none; } |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 533 | } |
| 534 | |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 535 | |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 536 | </style> |
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 537 | <script type="text/javascript"> |
| 538 | /*<![CDATA[*/ |
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 539 | var asciidoc = { // Namespace. |
| 540 | |
| 541 | ///////////////////////////////////////////////////////////////////// |
| 542 | // Table Of Contents generator |
| 543 | ///////////////////////////////////////////////////////////////////// |
| 544 | |
| 545 | /* Author: Mihai Bazon, September 2002 |
| 546 | * http://students.infoiasi.ro/~mishoo |
| 547 | * |
| 548 | * Table Of Content generator |
| 549 | * Version: 0.4 |
| 550 | * |
| 551 | * Feel free to use this script under the terms of the GNU General Public |
| 552 | * License, as long as you do not remove or alter this notice. |
| 553 | */ |
| 554 | |
| 555 | /* modified by Troy D. Hanson, September 2006. License: GPL */ |
| 556 | /* modified by Stuart Rackham, 2006, 2009. License: GPL */ |
| 557 | |
| 558 | // toclevels = 1..4. |
| 559 | toc: function (toclevels) { |
| 560 | |
| 561 | function getText(el) { |
| 562 | var text = ""; |
| 563 | for (var i = el.firstChild; i != null; i = i.nextSibling) { |
| 564 | if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants. |
| 565 | text += i.data; |
| 566 | else if (i.firstChild != null) |
| 567 | text += getText(i); |
| 568 | } |
| 569 | return text; |
| 570 | } |
| 571 | |
| 572 | function TocEntry(el, text, toclevel) { |
| 573 | this.element = el; |
| 574 | this.text = text; |
| 575 | this.toclevel = toclevel; |
| 576 | } |
| 577 | |
| 578 | function tocEntries(el, toclevels) { |
| 579 | var result = new Array; |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 580 | var re = new RegExp('[hH]([1-'+(toclevels+1)+'])'); |
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 581 | // Function that scans the DOM tree for header elements (the DOM2 |
| 582 | // nodeIterator API would be a better technique but not supported by all |
| 583 | // browsers). |
| 584 | var iterate = function (el) { |
| 585 | for (var i = el.firstChild; i != null; i = i.nextSibling) { |
| 586 | if (i.nodeType == 1 /* Node.ELEMENT_NODE */) { |
| 587 | var mo = re.exec(i.tagName); |
| 588 | if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") { |
| 589 | result[result.length] = new TocEntry(i, getText(i), mo[1]-1); |
| 590 | } |
| 591 | iterate(i); |
| 592 | } |
| 593 | } |
| 594 | } |
| 595 | iterate(el); |
| 596 | return result; |
| 597 | } |
| 598 | |
| 599 | var toc = document.getElementById("toc"); |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 600 | if (!toc) { |
| 601 | return; |
| 602 | } |
| 603 | |
| 604 | // Delete existing TOC entries in case we're reloading the TOC. |
| 605 | var tocEntriesToRemove = []; |
| 606 | var i; |
| 607 | for (i = 0; i < toc.childNodes.length; i++) { |
| 608 | var entry = toc.childNodes[i]; |
| 609 | if (entry.nodeName.toLowerCase() == 'div' |
| 610 | && entry.getAttribute("class") |
| 611 | && entry.getAttribute("class").match(/^toclevel/)) |
| 612 | tocEntriesToRemove.push(entry); |
| 613 | } |
| 614 | for (i = 0; i < tocEntriesToRemove.length; i++) { |
| 615 | toc.removeChild(tocEntriesToRemove[i]); |
| 616 | } |
| 617 | |
| 618 | // Rebuild TOC entries. |
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 619 | var entries = tocEntries(document.getElementById("content"), toclevels); |
| 620 | for (var i = 0; i < entries.length; ++i) { |
| 621 | var entry = entries[i]; |
| 622 | if (entry.element.id == "") |
| 623 | entry.element.id = "_toc_" + i; |
| 624 | var a = document.createElement("a"); |
| 625 | a.href = "#" + entry.element.id; |
| 626 | a.appendChild(document.createTextNode(entry.text)); |
| 627 | var div = document.createElement("div"); |
| 628 | div.appendChild(a); |
| 629 | div.className = "toclevel" + entry.toclevel; |
| 630 | toc.appendChild(div); |
| 631 | } |
| 632 | if (entries.length == 0) |
| 633 | toc.parentNode.removeChild(toc); |
| 634 | }, |
| 635 | |
| 636 | |
| 637 | ///////////////////////////////////////////////////////////////////// |
| 638 | // Footnotes generator |
| 639 | ///////////////////////////////////////////////////////////////////// |
| 640 | |
| 641 | /* Based on footnote generation code from: |
| 642 | * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html |
| 643 | */ |
| 644 | |
| 645 | footnotes: function () { |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 646 | // Delete existing footnote entries in case we're reloading the footnodes. |
| 647 | var i; |
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 648 | var noteholder = document.getElementById("footnotes"); |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 649 | if (!noteholder) { |
| 650 | return; |
| 651 | } |
| 652 | var entriesToRemove = []; |
| 653 | for (i = 0; i < noteholder.childNodes.length; i++) { |
| 654 | var entry = noteholder.childNodes[i]; |
| 655 | if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote") |
| 656 | entriesToRemove.push(entry); |
| 657 | } |
| 658 | for (i = 0; i < entriesToRemove.length; i++) { |
| 659 | noteholder.removeChild(entriesToRemove[i]); |
| 660 | } |
| 661 | |
| 662 | // Rebuild footnote entries. |
| 663 | var cont = document.getElementById("content"); |
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 664 | var spans = cont.getElementsByTagName("span"); |
| 665 | var refs = {}; |
| 666 | var n = 0; |
| 667 | for (i=0; i<spans.length; i++) { |
| 668 | if (spans[i].className == "footnote") { |
| 669 | n++; |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 670 | var note = spans[i].getAttribute("data-note"); |
| 671 | if (!note) { |
| 672 | // Use [\s\S] in place of . so multi-line matches work. |
| 673 | // Because JavaScript has no s (dotall) regex flag. |
| 674 | note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1]; |
| 675 | spans[i].innerHTML = |
| 676 | "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n + |
| 677 | "' title='View footnote' class='footnote'>" + n + "</a>]"; |
| 678 | spans[i].setAttribute("data-note", note); |
| 679 | } |
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 680 | noteholder.innerHTML += |
| 681 | "<div class='footnote' id='_footnote_" + n + "'>" + |
| 682 | "<a href='#_footnoteref_" + n + "' title='Return to text'>" + |
| 683 | n + "</a>. " + note + "</div>"; |
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 684 | var id =spans[i].getAttribute("id"); |
| 685 | if (id != null) refs["#"+id] = n; |
| 686 | } |
| 687 | } |
| 688 | if (n == 0) |
| 689 | noteholder.parentNode.removeChild(noteholder); |
| 690 | else { |
| 691 | // Process footnoterefs. |
| 692 | for (i=0; i<spans.length; i++) { |
| 693 | if (spans[i].className == "footnoteref") { |
| 694 | var href = spans[i].getElementsByTagName("a")[0].getAttribute("href"); |
| 695 | href = href.match(/#.*/)[0]; // Because IE return full URL. |
| 696 | n = refs[href]; |
| 697 | spans[i].innerHTML = |
| 698 | "[<a href='#_footnote_" + n + |
| 699 | "' title='View footnote' class='footnote'>" + n + "</a>]"; |
| 700 | } |
| 701 | } |
| 702 | } |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 703 | }, |
| 704 | |
| 705 | install: function(toclevels) { |
| 706 | var timerId; |
| 707 | |
| 708 | function reinstall() { |
| 709 | asciidoc.footnotes(); |
| 710 | if (toclevels) { |
| 711 | asciidoc.toc(toclevels); |
| 712 | } |
| 713 | } |
| 714 | |
| 715 | function reinstallAndRemoveTimer() { |
| 716 | clearInterval(timerId); |
| 717 | reinstall(); |
| 718 | } |
| 719 | |
| 720 | timerId = setInterval(reinstall, 500); |
| 721 | if (document.addEventListener) |
| 722 | document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false); |
| 723 | else |
| 724 | window.onload = reinstallAndRemoveTimer; |
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 725 | } |
| 726 | |
| 727 | } |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 728 | asciidoc.install(); |
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 729 | /*]]>*/ |
| 730 | </script> |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 731 | </head> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 732 | <body class="manpage"> |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 733 | <div id="header"> |
| 734 | <h1> |
| 735 | git-show(1) Manual Page |
| 736 | </h1> |
| 737 | <h2>NAME</h2> |
| 738 | <div class="sectionbody"> |
| 739 | <p>git-show - |
| Junio C Hamano | 7d23f5e | 2006-12-16 07:44:04 | [diff] [blame] | 740 | Show various types of objects |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 741 | </p> |
| 742 | </div> |
| 743 | </div> |
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 744 | <div id="content"> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 745 | <div class="sect1"> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 746 | <h2 id="_synopsis">SYNOPSIS</h2> |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 747 | <div class="sectionbody"> |
| Junio C Hamano | 15567bc | 2011-07-23 00:51:59 | [diff] [blame] | 748 | <div class="verseblock"> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 749 | <pre class="content"><em>git show</em> [options] <object>…</pre> |
| 750 | <div class="attribution"> |
| Junio C Hamano | 15567bc | 2011-07-23 00:51:59 | [diff] [blame] | 751 | </div></div> |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 752 | </div> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 753 | </div> |
| 754 | <div class="sect1"> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 755 | <h2 id="_description">DESCRIPTION</h2> |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 756 | <div class="sectionbody"> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 757 | <div class="paragraph"><p>Shows one or more objects (blobs, trees, tags and commits).</p></div> |
| 758 | <div class="paragraph"><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] | 759 | presents the merge commit in a special format as produced by |
| Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 760 | <em>git diff-tree --cc</em>.</p></div> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 761 | <div class="paragraph"><p>For tags, it shows the tag message and the referenced objects.</p></div> |
| 762 | <div class="paragraph"><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] | 763 | with --name-only).</p></div> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 764 | <div class="paragraph"><p>For plain blobs, it shows the plain contents.</p></div> |
| 765 | <div class="paragraph"><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] | 766 | control how the changes the commit introduces are shown.</p></div> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 767 | <div class="paragraph"><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] | 768 | </div> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 769 | </div> |
| 770 | <div class="sect1"> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 771 | <h2 id="_options">OPTIONS</h2> |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 772 | <div class="sectionbody"> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 773 | <div class="dlist"><dl> |
| 774 | <dt class="hdlist1"> |
| Junio C Hamano | 9e39507 | 2008-07-31 22:11:21 | [diff] [blame] | 775 | <object>… |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 776 | </dt> |
| 777 | <dd> |
| 778 | <p> |
| Junio C Hamano | 9e39507 | 2008-07-31 22:11:21 | [diff] [blame] | 779 | The names of objects to show. |
| Junio C Hamano | 2d47c62 | 2007-01-18 06:24:10 | [diff] [blame] | 780 | For a more complete list of ways to spell object names, see |
| Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 781 | "SPECIFYING REVISIONS" section in <a href="gitrevisions.html">gitrevisions(7)</a>. |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 782 | </p> |
| 783 | </dd> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 784 | <dt class="hdlist1"> |
| Junio C Hamano | d2179ef | 2010-10-22 04:12:17 | [diff] [blame] | 785 | --pretty[=<format>] |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 786 | </dt> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 787 | <dt class="hdlist1"> |
| Junio C Hamano | d2179ef | 2010-10-22 04:12:17 | [diff] [blame] | 788 | --format=<format> |
| Junio C Hamano | 0a23522 | 2009-03-06 08:21:09 | [diff] [blame] | 789 | </dt> |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 790 | <dd> |
| 791 | <p> |
| Junio C Hamano | a3770f9 | 2007-07-25 08:53:33 | [diff] [blame] | 792 | Pretty-print the contents of the commit logs in a given format, |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 793 | where <em><format></em> can be one of <em>oneline</em>, <em>short</em>, <em>medium</em>, |
| Junio C Hamano | e32ec8b | 2010-06-02 23:32:31 | [diff] [blame] | 794 | <em>full</em>, <em>fuller</em>, <em>email</em>, <em>raw</em> and <em>format:<string></em>. See |
| 795 | the "PRETTY FORMATS" section for some additional details for each |
| 796 | format. When omitted, the format defaults to <em>medium</em>. |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 797 | </p> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 798 | <div class="paragraph"><p>Note: you can specify the default pretty format in the repository |
| Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 799 | 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] | 800 | </dd> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 801 | <dt class="hdlist1"> |
| Junio C Hamano | ee695f2 | 2007-06-21 00:35:36 | [diff] [blame] | 802 | --abbrev-commit |
| 803 | </dt> |
| 804 | <dd> |
| 805 | <p> |
| 806 | Instead of showing the full 40-byte hexadecimal commit object |
| Junio C Hamano | 6efe302 | 2009-01-13 16:47:56 | [diff] [blame] | 807 | name, show only a partial prefix. Non default number of |
| Junio C Hamano | ee695f2 | 2007-06-21 00:35:36 | [diff] [blame] | 808 | digits can be specified with "--abbrev=<n>" (which also modifies |
| 809 | diff output, if it is displayed). |
| 810 | </p> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 811 | <div class="paragraph"><p>This should make "--pretty=oneline" a whole lot more readable for |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 812 | people using 80-column terminals.</p></div> |
| Junio C Hamano | ee695f2 | 2007-06-21 00:35:36 | [diff] [blame] | 813 | </dd> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 814 | <dt class="hdlist1"> |
| Junio C Hamano | f93530e | 2011-05-25 23:59:59 | [diff] [blame] | 815 | --no-abbrev-commit |
| 816 | </dt> |
| 817 | <dd> |
| 818 | <p> |
| 819 | Show the full 40-byte hexadecimal commit object name. This negates |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 820 | <code>--abbrev-commit</code> and those options which imply it such as |
| Junio C Hamano | f93530e | 2011-05-25 23:59:59 | [diff] [blame] | 821 | "--oneline". It also overrides the <em>log.abbrevCommit</em> variable. |
| 822 | </p> |
| 823 | </dd> |
| 824 | <dt class="hdlist1"> |
| Junio C Hamano | 0a23522 | 2009-03-06 08:21:09 | [diff] [blame] | 825 | --oneline |
| 826 | </dt> |
| 827 | <dd> |
| 828 | <p> |
| 829 | This is a shorthand for "--pretty=oneline --abbrev-commit" |
| 830 | used together. |
| 831 | </p> |
| 832 | </dd> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 833 | <dt class="hdlist1"> |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 834 | --encoding[=<encoding>] |
| 835 | </dt> |
| 836 | <dd> |
| 837 | <p> |
| 838 | The commit objects record the encoding used for the log message |
| 839 | in their encoding header; this option can be used to tell the |
| 840 | command to re-code the commit log message in the encoding |
| 841 | preferred by the user. For non plumbing commands this |
| 842 | defaults to UTF-8. |
| 843 | </p> |
| 844 | </dd> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 845 | <dt class="hdlist1"> |
| Junio C Hamano | 6003346 | 2011-05-03 00:48:43 | [diff] [blame] | 846 | --notes[=<ref>] |
| Junio C Hamano | 57827fb | 2010-01-23 03:02:50 | [diff] [blame] | 847 | </dt> |
| 848 | <dd> |
| 849 | <p> |
| Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 850 | Show the notes (see <a href="git-notes.html">git-notes(1)</a>) that annotate the |
| Junio C Hamano | 57827fb | 2010-01-23 03:02:50 | [diff] [blame] | 851 | commit, when showing the commit log message. This is the default |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 852 | for <code>git log</code>, <code>git show</code> and <code>git whatchanged</code> commands when |
| 853 | there is no <code>--pretty</code>, <code>--format</code> nor <code>--oneline</code> option given |
| Junio C Hamano | 6003346 | 2011-05-03 00:48:43 | [diff] [blame] | 854 | on the command line. |
| Junio C Hamano | 57827fb | 2010-01-23 03:02:50 | [diff] [blame] | 855 | </p> |
| Junio C Hamano | 6003346 | 2011-05-03 00:48:43 | [diff] [blame] | 856 | <div class="paragraph"><p>By default, the notes shown are from the notes refs listed in the |
| 857 | <em>core.notesRef</em> and <em>notes.displayRef</em> variables (or corresponding |
| Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 858 | environment overrides). See <a href="git-config.html">git-config(1)</a> for more details.</p></div> |
| Junio C Hamano | 6003346 | 2011-05-03 00:48:43 | [diff] [blame] | 859 | <div class="paragraph"><p>With an optional <em><ref></em> argument, show this notes ref instead of the |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 860 | default notes ref(s). The ref is taken to be in <code>refs/notes/</code> if it |
| Junio C Hamano | 6003346 | 2011-05-03 00:48:43 | [diff] [blame] | 861 | is not qualified.</p></div> |
| 862 | <div class="paragraph"><p>Multiple --notes options can be combined to control which notes are |
| 863 | being displayed. Examples: "--notes=foo" will show only notes from |
| 864 | "refs/notes/foo"; "--notes=foo --notes" will show both notes from |
| 865 | "refs/notes/foo" and from the default notes ref(s).</p></div> |
| Junio C Hamano | 3166736 | 2010-03-25 00:38:53 | [diff] [blame] | 866 | </dd> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 867 | <dt class="hdlist1"> |
| Junio C Hamano | 6003346 | 2011-05-03 00:48:43 | [diff] [blame] | 868 | --no-notes |
| 869 | </dt> |
| 870 | <dd> |
| 871 | <p> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 872 | Do not show notes. This negates the above <code>--notes</code> option, by |
| Junio C Hamano | 6003346 | 2011-05-03 00:48:43 | [diff] [blame] | 873 | resetting the list of notes refs from which notes are shown. |
| 874 | Options are parsed in the order given on the command line, so e.g. |
| 875 | "--notes --notes=foo --no-notes --notes=bar" will only show notes |
| 876 | from "refs/notes/bar". |
| 877 | </p> |
| 878 | </dd> |
| 879 | <dt class="hdlist1"> |
| 880 | --show-notes[=<ref>] |
| 881 | </dt> |
| 882 | <dt class="hdlist1"> |
| Junio C Hamano | 3166736 | 2010-03-25 00:38:53 | [diff] [blame] | 883 | --[no-]standard-notes |
| 884 | </dt> |
| 885 | <dd> |
| 886 | <p> |
| Junio C Hamano | 6003346 | 2011-05-03 00:48:43 | [diff] [blame] | 887 | These options are deprecated. Use the above --notes/--no-notes |
| 888 | options instead. |
| Junio C Hamano | 3166736 | 2010-03-25 00:38:53 | [diff] [blame] | 889 | </p> |
| Junio C Hamano | 57827fb | 2010-01-23 03:02:50 | [diff] [blame] | 890 | </dd> |
| Junio C Hamano | 0acb1ae | 2012-09-24 21:28:13 | [diff] [blame] | 891 | <dt class="hdlist1"> |
| 892 | --show-signature |
| 893 | </dt> |
| 894 | <dd> |
| 895 | <p> |
| 896 | Check the validity of a signed commit object by passing the signature |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 897 | to <code>gpg --verify</code> and show the output. |
| Junio C Hamano | 0acb1ae | 2012-09-24 21:28:13 | [diff] [blame] | 898 | </p> |
| 899 | </dd> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 900 | </dl></div> |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 901 | </div> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 902 | </div> |
| 903 | <div class="sect1"> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 904 | <h2 id="_pretty_formats">PRETTY FORMATS</h2> |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 905 | <div class="sectionbody"> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 906 | <div class="paragraph"><p>If the commit is a merge, and if the pretty-format |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 907 | is not <em>oneline</em>, <em>email</em> or <em>raw</em>, an additional line is |
| 908 | inserted before the <em>Author:</em> line. This line begins with |
| 909 | "Merge: " and the sha1s of ancestral commits are printed, |
| 910 | separated by spaces. Note that the listed commits may not |
| 911 | necessarily be the list of the <strong>direct</strong> parent commits if you |
| 912 | have limited your view of history: for example, if you are |
| 913 | only interested in changes related to a certain directory or |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 914 | file.</p></div> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 915 | <div class="paragraph"><p>There are several built-in formats, and you can define |
| Junio C Hamano | a574a09 | 2010-06-13 19:57:10 | [diff] [blame] | 916 | additional formats by setting a pretty.<name> |
| 917 | config option to either another format name, or a |
| 918 | <em>format:</em> string, as described below (see |
| Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 919 | <a href="git-config.html">git-config(1)</a>). Here are the details of the |
| Junio C Hamano | a574a09 | 2010-06-13 19:57:10 | [diff] [blame] | 920 | built-in formats:</p></div> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 921 | <div class="ulist"><ul> |
| Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 922 | <li> |
| 923 | <p> |
| 924 | <em>oneline</em> |
| 925 | </p> |
| 926 | <div class="literalblock"> |
| 927 | <div class="content"> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 928 | <pre><code><sha1> <title line></code></pre> |
| Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 929 | </div></div> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 930 | <div class="paragraph"><p>This is designed to be as compact as possible.</p></div> |
| Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 931 | </li> |
| 932 | <li> |
| 933 | <p> |
| 934 | <em>short</em> |
| 935 | </p> |
| 936 | <div class="literalblock"> |
| 937 | <div class="content"> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 938 | <pre><code>commit <sha1> |
| 939 | Author: <author></code></pre> |
| Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 940 | </div></div> |
| 941 | <div class="literalblock"> |
| 942 | <div class="content"> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 943 | <pre><code><title line></code></pre> |
| Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 944 | </div></div> |
| 945 | </li> |
| 946 | <li> |
| 947 | <p> |
| 948 | <em>medium</em> |
| 949 | </p> |
| 950 | <div class="literalblock"> |
| 951 | <div class="content"> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 952 | <pre><code>commit <sha1> |
| Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 953 | Author: <author> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 954 | Date: <author date></code></pre> |
| Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 955 | </div></div> |
| 956 | <div class="literalblock"> |
| 957 | <div class="content"> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 958 | <pre><code><title line></code></pre> |
| Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 959 | </div></div> |
| 960 | <div class="literalblock"> |
| 961 | <div class="content"> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 962 | <pre><code><full commit message></code></pre> |
| Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 963 | </div></div> |
| 964 | </li> |
| 965 | <li> |
| 966 | <p> |
| 967 | <em>full</em> |
| 968 | </p> |
| 969 | <div class="literalblock"> |
| 970 | <div class="content"> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 971 | <pre><code>commit <sha1> |
| Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 972 | Author: <author> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 973 | Commit: <committer></code></pre> |
| Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 974 | </div></div> |
| 975 | <div class="literalblock"> |
| 976 | <div class="content"> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 977 | <pre><code><title line></code></pre> |
| Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 978 | </div></div> |
| 979 | <div class="literalblock"> |
| 980 | <div class="content"> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 981 | <pre><code><full commit message></code></pre> |
| Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 982 | </div></div> |
| 983 | </li> |
| 984 | <li> |
| 985 | <p> |
| 986 | <em>fuller</em> |
| 987 | </p> |
| 988 | <div class="literalblock"> |
| 989 | <div class="content"> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 990 | <pre><code>commit <sha1> |
| Junio C Hamano | 6a3c827 | 2008-12-19 21:38:18 | [diff] [blame] | 991 | Author: <author> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 992 | AuthorDate: <author date> |
| Junio C Hamano | 6a3c827 | 2008-12-19 21:38:18 | [diff] [blame] | 993 | Commit: <committer> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 994 | CommitDate: <committer date></code></pre> |
| Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 995 | </div></div> |
| 996 | <div class="literalblock"> |
| 997 | <div class="content"> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 998 | <pre><code><title line></code></pre> |
| Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 999 | </div></div> |
| 1000 | <div class="literalblock"> |
| 1001 | <div class="content"> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1002 | <pre><code><full commit message></code></pre> |
| Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 1003 | </div></div> |
| 1004 | </li> |
| 1005 | <li> |
| 1006 | <p> |
| 1007 | <em>email</em> |
| 1008 | </p> |
| 1009 | <div class="literalblock"> |
| 1010 | <div class="content"> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1011 | <pre><code>From <sha1> <date> |
| Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 1012 | From: <author> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1013 | Date: <author date> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1014 | Subject: [PATCH] <title line></code></pre> |
| Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 1015 | </div></div> |
| 1016 | <div class="literalblock"> |
| 1017 | <div class="content"> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1018 | <pre><code><full commit message></code></pre> |
| Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 1019 | </div></div> |
| 1020 | </li> |
| 1021 | <li> |
| 1022 | <p> |
| 1023 | <em>raw</em> |
| 1024 | </p> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1025 | <div class="paragraph"><p>The <em>raw</em> format shows the entire commit exactly as |
| Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 1026 | stored in the commit object. Notably, the SHA1s are |
| 1027 | displayed in full, regardless of whether --abbrev or |
| 1028 | --no-abbrev are used, and <em>parents</em> information show the |
| 1029 | true parent commits, without taking grafts nor history |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1030 | simplification into account.</p></div> |
| Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 1031 | </li> |
| Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1032 | <li> |
| 1033 | <p> |
| Junio C Hamano | e32ec8b | 2010-06-02 23:32:31 | [diff] [blame] | 1034 | <em>format:<string></em> |
| Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1035 | </p> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1036 | <div class="paragraph"><p>The <em>format:<string></em> format allows you to specify which information |
| Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1037 | you want to show. It works a little bit like printf format, |
| 1038 | 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] | 1039 | instead of <em>\n</em>.</p></div> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1040 | <div class="paragraph"><p>E.g, <em>format:"The author of %h was %an, %ar%nThe title was >>%s<<%n"</em> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1041 | would show something like this:</p></div> |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 1042 | <div class="listingblock"> |
| 1043 | <div class="content"> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1044 | <pre><code>The author of fe6e0ee was Junio C Hamano, 23 hours ago |
| 1045 | The title was >>t4119: test autocomputing -p<n> for traditional diff input.<<</code></pre> |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 1046 | </div></div> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1047 | <div class="paragraph"><p>The placeholders are:</p></div> |
| 1048 | <div class="ulist"><ul> |
| Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1049 | <li> |
| 1050 | <p> |
| 1051 | <em>%H</em>: commit hash |
| 1052 | </p> |
| 1053 | </li> |
| 1054 | <li> |
| 1055 | <p> |
| 1056 | <em>%h</em>: abbreviated commit hash |
| 1057 | </p> |
| 1058 | </li> |
| 1059 | <li> |
| 1060 | <p> |
| 1061 | <em>%T</em>: tree hash |
| 1062 | </p> |
| 1063 | </li> |
| 1064 | <li> |
| 1065 | <p> |
| 1066 | <em>%t</em>: abbreviated tree hash |
| 1067 | </p> |
| 1068 | </li> |
| 1069 | <li> |
| 1070 | <p> |
| 1071 | <em>%P</em>: parent hashes |
| 1072 | </p> |
| 1073 | </li> |
| 1074 | <li> |
| 1075 | <p> |
| 1076 | <em>%p</em>: abbreviated parent hashes |
| 1077 | </p> |
| 1078 | </li> |
| 1079 | <li> |
| 1080 | <p> |
| 1081 | <em>%an</em>: author name |
| 1082 | </p> |
| 1083 | </li> |
| 1084 | <li> |
| 1085 | <p> |
| Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1086 | <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] | 1087 | </p> |
| 1088 | </li> |
| 1089 | <li> |
| 1090 | <p> |
| Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1091 | <em>%ae</em>: author email |
| 1092 | </p> |
| 1093 | </li> |
| 1094 | <li> |
| 1095 | <p> |
| Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1096 | <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>) |
| Junio C Hamano | 8bc410e | 2009-02-15 10:38:19 | [diff] [blame] | 1097 | </p> |
| 1098 | </li> |
| 1099 | <li> |
| 1100 | <p> |
| Junio C Hamano | a387df3 | 2008-08-29 08:56:58 | [diff] [blame] | 1101 | <em>%ad</em>: author date (format respects --date= option) |
| Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1102 | </p> |
| 1103 | </li> |
| 1104 | <li> |
| 1105 | <p> |
| 1106 | <em>%aD</em>: author date, RFC2822 style |
| 1107 | </p> |
| 1108 | </li> |
| 1109 | <li> |
| 1110 | <p> |
| 1111 | <em>%ar</em>: author date, relative |
| 1112 | </p> |
| 1113 | </li> |
| 1114 | <li> |
| 1115 | <p> |
| 1116 | <em>%at</em>: author date, UNIX timestamp |
| 1117 | </p> |
| 1118 | </li> |
| 1119 | <li> |
| 1120 | <p> |
| Junio C Hamano | 02f130b | 2007-07-14 08:26:56 | [diff] [blame] | 1121 | <em>%ai</em>: author date, ISO 8601 format |
| 1122 | </p> |
| 1123 | </li> |
| 1124 | <li> |
| 1125 | <p> |
| Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1126 | <em>%cn</em>: committer name |
| 1127 | </p> |
| 1128 | </li> |
| 1129 | <li> |
| 1130 | <p> |
| Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1131 | <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] | 1132 | </p> |
| 1133 | </li> |
| 1134 | <li> |
| 1135 | <p> |
| Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1136 | <em>%ce</em>: committer email |
| 1137 | </p> |
| 1138 | </li> |
| 1139 | <li> |
| 1140 | <p> |
| Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1141 | <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>) |
| Junio C Hamano | 8bc410e | 2009-02-15 10:38:19 | [diff] [blame] | 1142 | </p> |
| 1143 | </li> |
| 1144 | <li> |
| 1145 | <p> |
| Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1146 | <em>%cd</em>: committer date |
| 1147 | </p> |
| 1148 | </li> |
| 1149 | <li> |
| 1150 | <p> |
| 1151 | <em>%cD</em>: committer date, RFC2822 style |
| 1152 | </p> |
| 1153 | </li> |
| 1154 | <li> |
| 1155 | <p> |
| 1156 | <em>%cr</em>: committer date, relative |
| 1157 | </p> |
| 1158 | </li> |
| 1159 | <li> |
| 1160 | <p> |
| 1161 | <em>%ct</em>: committer date, UNIX timestamp |
| 1162 | </p> |
| 1163 | </li> |
| 1164 | <li> |
| 1165 | <p> |
| Junio C Hamano | 02f130b | 2007-07-14 08:26:56 | [diff] [blame] | 1166 | <em>%ci</em>: committer date, ISO 8601 format |
| 1167 | </p> |
| 1168 | </li> |
| 1169 | <li> |
| 1170 | <p> |
| Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1171 | <em>%d</em>: ref names, like the --decorate option of <a href="git-log.html">git-log(1)</a> |
| Junio C Hamano | 5e4d8de | 2008-09-19 06:27:02 | [diff] [blame] | 1172 | </p> |
| 1173 | </li> |
| 1174 | <li> |
| 1175 | <p> |
| Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1176 | <em>%e</em>: encoding |
| 1177 | </p> |
| 1178 | </li> |
| 1179 | <li> |
| 1180 | <p> |
| 1181 | <em>%s</em>: subject |
| 1182 | </p> |
| 1183 | </li> |
| 1184 | <li> |
| 1185 | <p> |
| Junio C Hamano | 5f9a6f0 | 2009-04-06 08:26:56 | [diff] [blame] | 1186 | <em>%f</em>: sanitized subject line, suitable for a filename |
| 1187 | </p> |
| 1188 | </li> |
| 1189 | <li> |
| 1190 | <p> |
| Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1191 | <em>%b</em>: body |
| 1192 | </p> |
| 1193 | </li> |
| 1194 | <li> |
| 1195 | <p> |
| Junio C Hamano | cb39aea | 2010-05-09 07:24:48 | [diff] [blame] | 1196 | <em>%B</em>: raw body (unwrapped subject and body) |
| 1197 | </p> |
| 1198 | </li> |
| 1199 | <li> |
| 1200 | <p> |
| Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 1201 | <em>%N</em>: commit notes |
| 1202 | </p> |
| 1203 | </li> |
| 1204 | <li> |
| 1205 | <p> |
| Junio C Hamano | 0acb1ae | 2012-09-24 21:28:13 | [diff] [blame] | 1206 | <em>%GG</em>: raw verification message from GPG for a signed commit |
| 1207 | </p> |
| 1208 | </li> |
| 1209 | <li> |
| 1210 | <p> |
| 1211 | <em>%G?</em>: show either "G" for Good or "B" for Bad for a signed commit |
| 1212 | </p> |
| 1213 | </li> |
| 1214 | <li> |
| 1215 | <p> |
| 1216 | <em>%GS</em>: show the name of the signer for a signed commit |
| 1217 | </p> |
| 1218 | </li> |
| 1219 | <li> |
| 1220 | <p> |
| Junio C Hamano | 5e7f131 | 2013-03-21 22:49:01 | [diff] [blame^] | 1221 | <em>%GK</em>: show the key used to sign a signed commit |
| 1222 | </p> |
| 1223 | </li> |
| 1224 | <li> |
| 1225 | <p> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1226 | <em>%gD</em>: reflog selector, e.g., <code>refs/stash@{1}</code> |
| Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 1227 | </p> |
| 1228 | </li> |
| 1229 | <li> |
| 1230 | <p> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1231 | <em>%gd</em>: shortened reflog selector, e.g., <code>stash@{1}</code> |
| Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 1232 | </p> |
| 1233 | </li> |
| 1234 | <li> |
| 1235 | <p> |
| Junio C Hamano | 962f3a3 | 2011-12-22 20:21:44 | [diff] [blame] | 1236 | <em>%gn</em>: reflog identity name |
| 1237 | </p> |
| 1238 | </li> |
| 1239 | <li> |
| 1240 | <p> |
| Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1241 | <em>%gN</em>: reflog identity 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 | 962f3a3 | 2011-12-22 20:21:44 | [diff] [blame] | 1242 | </p> |
| 1243 | </li> |
| 1244 | <li> |
| 1245 | <p> |
| 1246 | <em>%ge</em>: reflog identity email |
| 1247 | </p> |
| 1248 | </li> |
| 1249 | <li> |
| 1250 | <p> |
| Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1251 | <em>%gE</em>: reflog identity email (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 | 962f3a3 | 2011-12-22 20:21:44 | [diff] [blame] | 1252 | </p> |
| 1253 | </li> |
| 1254 | <li> |
| 1255 | <p> |
| Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 1256 | <em>%gs</em>: reflog subject |
| 1257 | </p> |
| 1258 | </li> |
| 1259 | <li> |
| 1260 | <p> |
| Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1261 | <em>%Cred</em>: switch color to red |
| 1262 | </p> |
| 1263 | </li> |
| 1264 | <li> |
| 1265 | <p> |
| 1266 | <em>%Cgreen</em>: switch color to green |
| 1267 | </p> |
| 1268 | </li> |
| 1269 | <li> |
| 1270 | <p> |
| 1271 | <em>%Cblue</em>: switch color to blue |
| 1272 | </p> |
| 1273 | </li> |
| 1274 | <li> |
| 1275 | <p> |
| 1276 | <em>%Creset</em>: reset color |
| 1277 | </p> |
| 1278 | </li> |
| 1279 | <li> |
| 1280 | <p> |
| Junio C Hamano | abad6da | 2013-01-06 09:06:32 | [diff] [blame] | 1281 | <em>%C(…)</em>: color specification, as described in color.branch.* config option; |
| 1282 | adding <code>auto,</code> at the beginning will emit color only when colors are |
| 1283 | enabled for log output (by <code>color.diff</code>, <code>color.ui</code>, or <code>--color</code>, and |
| 1284 | respecting the <code>auto</code> settings of the former if we are going to a |
| 1285 | terminal) |
| Junio C Hamano | cc0cb31 | 2009-01-22 03:38:50 | [diff] [blame] | 1286 | </p> |
| 1287 | </li> |
| 1288 | <li> |
| 1289 | <p> |
| Junio C Hamano | d9e0e5d | 2007-04-14 16:22:04 | [diff] [blame] | 1290 | <em>%m</em>: left, right or boundary mark |
| 1291 | </p> |
| 1292 | </li> |
| 1293 | <li> |
| 1294 | <p> |
| Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1295 | <em>%n</em>: newline |
| 1296 | </p> |
| Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 1297 | </li> |
| Junio C Hamano | b78d259 | 2008-04-09 09:39:08 | [diff] [blame] | 1298 | <li> |
| 1299 | <p> |
| Junio C Hamano | a9701f0 | 2010-01-21 00:42:16 | [diff] [blame] | 1300 | <em>%%</em>: a raw <em>%</em> |
| 1301 | </p> |
| 1302 | </li> |
| 1303 | <li> |
| 1304 | <p> |
| Junio C Hamano | b78d259 | 2008-04-09 09:39:08 | [diff] [blame] | 1305 | <em>%x00</em>: print a byte from a hex code |
| 1306 | </p> |
| 1307 | </li> |
| Junio C Hamano | bf984de | 2009-11-23 06:11:19 | [diff] [blame] | 1308 | <li> |
| 1309 | <p> |
| 1310 | <em>%w([<w>[,<i1>[,<i2>]]])</em>: switch line wrapping, like the -w option of |
| Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1311 | <a href="git-shortlog.html">git-shortlog(1)</a>. |
| Junio C Hamano | bf984de | 2009-11-23 06:11:19 | [diff] [blame] | 1312 | </p> |
| 1313 | </li> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1314 | </ul></div> |
| Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1315 | </li> |
| Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 1316 | </ul></div> |
| 1317 | <div class="admonitionblock"> |
| 1318 | <table><tr> |
| 1319 | <td class="icon"> |
| 1320 | <div class="title">Note</div> |
| 1321 | </td> |
| 1322 | <td class="content">Some placeholders may depend on other options given to the |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1323 | revision traversal engine. For example, the <code>%g*</code> reflog options will |
| Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 1324 | insert an empty string unless we are traversing reflog entries (e.g., by |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1325 | <code>git log -g</code>). The <code>%d</code> placeholder will use the "short" decoration |
| 1326 | format if <code>--decorate</code> was not already provided on the command line.</td> |
| Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 1327 | </tr></table> |
| 1328 | </div> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1329 | <div class="paragraph"><p>If you add a <code>+</code> (plus sign) after <em>%</em> of a placeholder, a line-feed |
| Junio C Hamano | 2bd8a74 | 2009-12-01 21:16:59 | [diff] [blame] | 1330 | is inserted immediately before the expansion if and only if the |
| 1331 | placeholder expands to a non-empty string.</p></div> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1332 | <div class="paragraph"><p>If you add a <code>-</code> (minus sign) after <em>%</em> of a placeholder, line-feeds that |
| Junio C Hamano | 2bd8a74 | 2009-12-01 21:16:59 | [diff] [blame] | 1333 | immediately precede the expansion are deleted if and only if the |
| 1334 | placeholder expands to an empty string.</p></div> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1335 | <div class="paragraph"><p>If you add a ` ` (space) after <em>%</em> of a placeholder, a space |
| Junio C Hamano | 89a5734 | 2010-06-22 23:22:55 | [diff] [blame] | 1336 | is inserted immediately before the expansion if and only if the |
| 1337 | placeholder expands to a non-empty string.</p></div> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1338 | <div class="ulist"><ul> |
| Junio C Hamano | 6fb124c | 2008-06-13 10:04:01 | [diff] [blame] | 1339 | <li> |
| 1340 | <p> |
| 1341 | <em>tformat:</em> |
| 1342 | </p> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1343 | <div class="paragraph"><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] | 1344 | provides "terminator" semantics instead of "separator" semantics. In |
| 1345 | other words, each commit has the message terminator character (usually a |
| 1346 | newline) appended, rather than a separator placed between entries. |
| 1347 | This means that the final entry of a single-line format will be properly |
| 1348 | terminated with a new line, just as the "oneline" format does. |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1349 | For example:</p></div> |
| Junio C Hamano | 6fb124c | 2008-06-13 10:04:01 | [diff] [blame] | 1350 | <div class="listingblock"> |
| 1351 | <div class="content"> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1352 | <pre><code>$ git log -2 --pretty=format:%h 4da45bef \ |
| Junio C Hamano | 6fb124c | 2008-06-13 10:04:01 | [diff] [blame] | 1353 | | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/' |
| 1354 | 4da45be |
| 1355 | 7134973 -- NO NEWLINE |
| 1356 | |
| 1357 | $ git log -2 --pretty=tformat:%h 4da45bef \ |
| 1358 | | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/' |
| 1359 | 4da45be |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1360 | 7134973</code></pre> |
| Junio C Hamano | 6fb124c | 2008-06-13 10:04:01 | [diff] [blame] | 1361 | </div></div> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1362 | <div class="paragraph"><p>In addition, any unrecognized string that has a <code>%</code> in it is interpreted |
| 1363 | as if it has <code>tformat:</code> in front of it. For example, these two are |
| Junio C Hamano | 0a23522 | 2009-03-06 08:21:09 | [diff] [blame] | 1364 | equivalent:</p></div> |
| 1365 | <div class="listingblock"> |
| 1366 | <div class="content"> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1367 | <pre><code>$ git log -2 --pretty=tformat:%h 4da45bef |
| 1368 | $ git log -2 --pretty=%h 4da45bef</code></pre> |
| Junio C Hamano | 0a23522 | 2009-03-06 08:21:09 | [diff] [blame] | 1369 | </div></div> |
| Junio C Hamano | 6fb124c | 2008-06-13 10:04:01 | [diff] [blame] | 1370 | </li> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1371 | </ul></div> |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 1372 | </div> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1373 | </div> |
| 1374 | <div class="sect1"> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1375 | <h2 id="_examples">EXAMPLES</h2> |
| Junio C Hamano | 7d23f5e | 2006-12-16 07:44:04 | [diff] [blame] | 1376 | <div class="sectionbody"> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1377 | <div class="dlist"><dl> |
| 1378 | <dt class="hdlist1"> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1379 | <code>git show v1.0.0</code> |
| Junio C Hamano | 7d23f5e | 2006-12-16 07:44:04 | [diff] [blame] | 1380 | </dt> |
| 1381 | <dd> |
| 1382 | <p> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1383 | Shows the tag <code>v1.0.0</code>, along with the object the tags |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1384 | points at. |
| Junio C Hamano | 7d23f5e | 2006-12-16 07:44:04 | [diff] [blame] | 1385 | </p> |
| 1386 | </dd> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1387 | <dt class="hdlist1"> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1388 | <code>git show v1.0.0^{tree}</code> |
| Junio C Hamano | 7d23f5e | 2006-12-16 07:44:04 | [diff] [blame] | 1389 | </dt> |
| 1390 | <dd> |
| 1391 | <p> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1392 | Shows the tree pointed to by the tag <code>v1.0.0</code>. |
| Junio C Hamano | 7d23f5e | 2006-12-16 07:44:04 | [diff] [blame] | 1393 | </p> |
| 1394 | </dd> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1395 | <dt class="hdlist1"> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1396 | <code>git show -s --format=%s v1.0.0^{commit}</code> |
| Junio C Hamano | c3fda57 | 2010-11-09 19:41:30 | [diff] [blame] | 1397 | </dt> |
| 1398 | <dd> |
| 1399 | <p> |
| 1400 | Shows the subject of the commit pointed to by the |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1401 | tag <code>v1.0.0</code>. |
| Junio C Hamano | c3fda57 | 2010-11-09 19:41:30 | [diff] [blame] | 1402 | </p> |
| 1403 | </dd> |
| 1404 | <dt class="hdlist1"> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1405 | <code>git show next~10:Documentation/README</code> |
| Junio C Hamano | db911ee | 2007-02-28 08:13:52 | [diff] [blame] | 1406 | </dt> |
| 1407 | <dd> |
| 1408 | <p> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1409 | Shows the contents of the file <code>Documentation/README</code> as |
| Junio C Hamano | 7d23f5e | 2006-12-16 07:44:04 | [diff] [blame] | 1410 | they were current in the 10th last commit of the branch |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1411 | <code>next</code>. |
| Junio C Hamano | db911ee | 2007-02-28 08:13:52 | [diff] [blame] | 1412 | </p> |
| 1413 | </dd> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1414 | <dt class="hdlist1"> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1415 | <code>git show master:Makefile master:t/Makefile</code> |
| Junio C Hamano | db911ee | 2007-02-28 08:13:52 | [diff] [blame] | 1416 | </dt> |
| 1417 | <dd> |
| 1418 | <p> |
| Junio C Hamano | 7d23f5e | 2006-12-16 07:44:04 | [diff] [blame] | 1419 | Concatenates the contents of said Makefiles in the head |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1420 | of the branch <code>master</code>. |
| Junio C Hamano | db911ee | 2007-02-28 08:13:52 | [diff] [blame] | 1421 | </p> |
| 1422 | </dd> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1423 | </dl></div> |
| Junio C Hamano | 7d23f5e | 2006-12-16 07:44:04 | [diff] [blame] | 1424 | </div> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1425 | </div> |
| 1426 | <div class="sect1"> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1427 | <h2 id="_discussion">Discussion</h2> |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1428 | <div class="sectionbody"> |
| Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 1429 | <div class="paragraph"><p>At the core level, Git is character encoding agnostic.</p></div> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1430 | <div class="ulist"><ul> |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1431 | <li> |
| 1432 | <p> |
| 1433 | The pathnames recorded in the index and in the tree objects |
| 1434 | are treated as uninterpreted sequences of non-NUL bytes. |
| 1435 | What readdir(2) returns are what are recorded and compared |
| Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 1436 | with the data Git keeps track of, which in turn are expected |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1437 | to be what lstat(2) and creat(2) accepts. There is no such |
| 1438 | thing as pathname encoding translation. |
| 1439 | </p> |
| 1440 | </li> |
| 1441 | <li> |
| 1442 | <p> |
| Junio C Hamano | 54bf1e2 | 2008-12-20 06:30:11 | [diff] [blame] | 1443 | The contents of the blob objects are uninterpreted sequences |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1444 | of bytes. There is no encoding translation at the core |
| 1445 | level. |
| 1446 | </p> |
| 1447 | </li> |
| 1448 | <li> |
| 1449 | <p> |
| Junio C Hamano | 54bf1e2 | 2008-12-20 06:30:11 | [diff] [blame] | 1450 | The commit log messages are uninterpreted sequences of non-NUL |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1451 | bytes. |
| 1452 | </p> |
| 1453 | </li> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1454 | </ul></div> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1455 | <div class="paragraph"><p>Although we encourage that the commit log messages are encoded |
| Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 1456 | in UTF-8, both the core and Git Porcelain are designed not to |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1457 | force UTF-8 on projects. If all participants of a particular |
| Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 1458 | project find it more convenient to use legacy encodings, Git |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1459 | 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] | 1460 | mind.</p></div> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1461 | <div class="olist arabic"><ol class="arabic"> |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1462 | <li> |
| 1463 | <p> |
| Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 1464 | <em>git commit</em> and <em>git commit-tree</em> issues |
| Junio C Hamano | 14b7648 | 2008-01-05 10:32:26 | [diff] [blame] | 1465 | 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] | 1466 | like a valid UTF-8 string, unless you explicitly say your |
| 1467 | project uses a legacy encoding. The way to say this is to |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1468 | have i18n.commitencoding in <code>.git/config</code> file, like this: |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1469 | </p> |
| 1470 | <div class="listingblock"> |
| 1471 | <div class="content"> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1472 | <pre><code>[i18n] |
| 1473 | commitencoding = ISO-8859-1</code></pre> |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1474 | </div></div> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1475 | <div class="paragraph"><p>Commit objects created with the above setting record the value |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1476 | of <code>i18n.commitencoding</code> in its <code>encoding</code> header. This is to |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1477 | help other people who look at them later. Lack of this header |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1478 | 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] | 1479 | </li> |
| 1480 | <li> |
| 1481 | <p> |
| Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 1482 | <em>git log</em>, <em>git show</em>, <em>git blame</em> and friends look at the |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1483 | <code>encoding</code> header of a commit object, and try to re-code the |
| Junio C Hamano | aa17c7c | 2008-11-03 04:36:58 | [diff] [blame] | 1484 | log message into UTF-8 unless otherwise specified. You can |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1485 | specify the desired output encoding with |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1486 | <code>i18n.logoutputencoding</code> in <code>.git/config</code> file, like this: |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1487 | </p> |
| 1488 | <div class="listingblock"> |
| 1489 | <div class="content"> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1490 | <pre><code>[i18n] |
| 1491 | logoutputencoding = ISO-8859-1</code></pre> |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1492 | </div></div> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1493 | <div class="paragraph"><p>If you do not have this configuration variable, the value of |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1494 | <code>i18n.commitencoding</code> is used instead.</p></div> |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1495 | </li> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1496 | </ol></div> |
| Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1497 | <div class="paragraph"><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] | 1498 | message when a commit is made to force UTF-8 at the commit |
| 1499 | object level, because re-coding to UTF-8 is not necessarily a |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1500 | reversible operation.</p></div> |
| Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 1501 | </div> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1502 | </div> |
| 1503 | <div class="sect1"> |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1504 | <h2 id="_git">GIT</h2> |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 1505 | <div class="sectionbody"> |
| Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1506 | <div class="paragraph"><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] | 1507 | </div> |
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 1508 | </div> |
| Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1509 | </div> |
| Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 1510 | <div id="footnotes"><hr /></div> |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 1511 | <div id="footer"> |
| 1512 | <div id="footer-text"> |
| Junio C Hamano | b76a686 | 2012-05-02 22:02:46 | [diff] [blame] | 1513 | Last updated 2012-05-02 15:00:44 PDT |
| Junio C Hamano | d9d71c0 | 2006-02-08 00:52:33 | [diff] [blame] | 1514 | </div> |
| 1515 | </div> |
| 1516 | </body> |
| 1517 | </html> |