Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [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 | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 6 | <meta name="generator" content="AsciiDoc 8.5.2" /> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 7 | <title>git-blame(1)</title> |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 8 | <style type="text/css"> |
| 9 | /* Debug borders */ |
| 10 | p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 { |
| 11 | /* |
| 12 | border: 1px solid red; |
| 13 | */ |
| 14 | } |
| 15 | |
| 16 | body { |
| 17 | margin: 1em 5% 1em 5%; |
| 18 | } |
| 19 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 20 | a { |
| 21 | color: blue; |
| 22 | text-decoration: underline; |
| 23 | } |
| 24 | a:visited { |
| 25 | color: fuchsia; |
| 26 | } |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 27 | |
| 28 | em { |
| 29 | font-style: italic; |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 30 | color: navy; |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 31 | } |
| 32 | |
| 33 | strong { |
| 34 | font-weight: bold; |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 35 | color: #083194; |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 36 | } |
| 37 | |
| 38 | tt { |
| 39 | color: navy; |
| 40 | } |
| 41 | |
| 42 | h1, h2, h3, h4, h5, h6 { |
| 43 | color: #527bbd; |
| 44 | font-family: sans-serif; |
| 45 | margin-top: 1.2em; |
| 46 | margin-bottom: 0.5em; |
| 47 | line-height: 1.3; |
| 48 | } |
| 49 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 50 | h1, h2, h3 { |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 51 | border-bottom: 2px solid silver; |
| 52 | } |
| 53 | h2 { |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 54 | padding-top: 0.5em; |
| 55 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 56 | h3 { |
| 57 | float: left; |
| 58 | } |
| 59 | h3 + * { |
| 60 | clear: left; |
| 61 | } |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 62 | |
| 63 | div.sectionbody { |
| 64 | font-family: serif; |
| 65 | margin-left: 0; |
| 66 | } |
| 67 | |
| 68 | hr { |
| 69 | border: 1px solid silver; |
| 70 | } |
| 71 | |
| 72 | p { |
| 73 | margin-top: 0.5em; |
| 74 | margin-bottom: 0.5em; |
| 75 | } |
| 76 | |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 77 | ul, ol, li > p { |
| 78 | margin-top: 0; |
| 79 | } |
| 80 | |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 81 | pre { |
| 82 | padding: 0; |
| 83 | margin: 0; |
| 84 | } |
| 85 | |
| 86 | span#author { |
| 87 | color: #527bbd; |
| 88 | font-family: sans-serif; |
| 89 | font-weight: bold; |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 90 | font-size: 1.1em; |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 91 | } |
| 92 | span#email { |
| 93 | } |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 94 | span#revnumber, span#revdate, span#revremark { |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 95 | font-family: sans-serif; |
| 96 | } |
| 97 | |
| 98 | div#footer { |
| 99 | font-family: sans-serif; |
| 100 | font-size: small; |
| 101 | border-top: 2px solid silver; |
| 102 | padding-top: 0.5em; |
| 103 | margin-top: 4.0em; |
| 104 | } |
| 105 | div#footer-text { |
| 106 | float: left; |
| 107 | padding-bottom: 0.5em; |
| 108 | } |
| 109 | div#footer-badges { |
| 110 | float: right; |
| 111 | padding-bottom: 0.5em; |
| 112 | } |
| 113 | |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 114 | div#preamble { |
| 115 | margin-top: 1.5em; |
| 116 | margin-bottom: 1.5em; |
| 117 | } |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 118 | div.tableblock, div.imageblock, div.exampleblock, div.verseblock, |
| 119 | div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, |
| 120 | div.admonitionblock { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 121 | margin-top: 1.0em; |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 122 | margin-bottom: 1.5em; |
| 123 | } |
| 124 | div.admonitionblock { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 125 | margin-top: 2.0em; |
| 126 | margin-bottom: 2.0em; |
| 127 | margin-right: 10%; |
| 128 | color: #606060; |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 129 | } |
| 130 | |
| 131 | div.content { /* Block element content. */ |
| 132 | padding: 0; |
| 133 | } |
| 134 | |
| 135 | /* Block element titles. */ |
| 136 | div.title, caption.title { |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 137 | color: #527bbd; |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 138 | font-family: sans-serif; |
| 139 | font-weight: bold; |
| 140 | text-align: left; |
| 141 | margin-top: 1.0em; |
| 142 | margin-bottom: 0.5em; |
| 143 | } |
| 144 | div.title + * { |
| 145 | margin-top: 0; |
| 146 | } |
| 147 | |
| 148 | td div.title:first-child { |
| 149 | margin-top: 0.0em; |
| 150 | } |
| 151 | div.content div.title:first-child { |
| 152 | margin-top: 0.0em; |
| 153 | } |
| 154 | div.content + div.title { |
| 155 | margin-top: 0.0em; |
| 156 | } |
| 157 | |
| 158 | div.sidebarblock > div.content { |
| 159 | background: #ffffee; |
| 160 | border: 1px solid silver; |
| 161 | padding: 0.5em; |
| 162 | } |
| 163 | |
| 164 | div.listingblock > div.content { |
| 165 | border: 1px solid silver; |
| 166 | background: #f4f4f4; |
| 167 | padding: 0.5em; |
| 168 | } |
| 169 | |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 170 | div.quoteblock, div.verseblock { |
| 171 | padding-left: 1.0em; |
| 172 | margin-left: 1.0em; |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 173 | margin-right: 10%; |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 174 | border-left: 5px solid #dddddd; |
| 175 | color: #777777; |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 176 | } |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 177 | |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 178 | div.quoteblock > div.attribution { |
| 179 | padding-top: 0.5em; |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 180 | text-align: right; |
| 181 | } |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 182 | |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 183 | div.verseblock > div.content { |
| 184 | white-space: pre; |
| 185 | } |
| 186 | div.verseblock > div.attribution { |
| 187 | padding-top: 0.75em; |
| 188 | text-align: left; |
| 189 | } |
| 190 | /* DEPRECATED: Pre version 8.2.7 verse style literal block. */ |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 191 | div.verseblock + div.attribution { |
| 192 | text-align: left; |
| 193 | } |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 194 | |
| 195 | div.admonitionblock .icon { |
| 196 | vertical-align: top; |
| 197 | font-size: 1.1em; |
| 198 | font-weight: bold; |
| 199 | text-decoration: underline; |
| 200 | color: #527bbd; |
| 201 | padding-right: 0.5em; |
| 202 | } |
| 203 | div.admonitionblock td.content { |
| 204 | padding-left: 0.5em; |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 205 | border-left: 3px solid #dddddd; |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 206 | } |
| 207 | |
| 208 | div.exampleblock > div.content { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 209 | border-left: 3px solid #dddddd; |
| 210 | padding-left: 0.5em; |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 211 | } |
| 212 | |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 213 | div.imageblock div.content { padding-left: 0; } |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 214 | span.image img { border-style: none; } |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 215 | a.image:visited { color: white; } |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 216 | |
| 217 | dl { |
| 218 | margin-top: 0.8em; |
| 219 | margin-bottom: 0.8em; |
| 220 | } |
| 221 | dt { |
| 222 | margin-top: 0.5em; |
| 223 | margin-bottom: 0; |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 224 | font-style: normal; |
| 225 | color: navy; |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 226 | } |
| 227 | dd > *:first-child { |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 228 | margin-top: 0.1em; |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 229 | } |
| 230 | |
| 231 | ul, ol { |
| 232 | list-style-position: outside; |
| 233 | } |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 234 | ol.arabic { |
| 235 | list-style-type: decimal; |
| 236 | } |
| 237 | ol.loweralpha { |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 238 | list-style-type: lower-alpha; |
| 239 | } |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 240 | ol.upperalpha { |
| 241 | list-style-type: upper-alpha; |
| 242 | } |
| 243 | ol.lowerroman { |
| 244 | list-style-type: lower-roman; |
| 245 | } |
| 246 | ol.upperroman { |
| 247 | list-style-type: upper-roman; |
| 248 | } |
| 249 | |
| 250 | div.compact ul, div.compact ol, |
| 251 | div.compact p, div.compact p, |
| 252 | div.compact div, div.compact div { |
| 253 | margin-top: 0.1em; |
| 254 | margin-bottom: 0.1em; |
| 255 | } |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 256 | |
| 257 | div.tableblock > table { |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 258 | border: 3px solid #527bbd; |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 259 | } |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 260 | thead, p.table.header { |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 261 | font-family: sans-serif; |
| 262 | font-weight: bold; |
| 263 | } |
| 264 | tfoot { |
| 265 | font-weight: bold; |
| 266 | } |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 267 | td > div.verse { |
| 268 | white-space: pre; |
| 269 | } |
| 270 | p.table { |
| 271 | margin-top: 0; |
| 272 | } |
| 273 | /* Because the table frame attribute is overriden by CSS in most browsers. */ |
| 274 | div.tableblock > table[frame="void"] { |
| 275 | border-style: none; |
| 276 | } |
| 277 | div.tableblock > table[frame="hsides"] { |
| 278 | border-left-style: none; |
| 279 | border-right-style: none; |
| 280 | } |
| 281 | div.tableblock > table[frame="vsides"] { |
| 282 | border-top-style: none; |
| 283 | border-bottom-style: none; |
| 284 | } |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 285 | |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 286 | |
| 287 | div.hdlist { |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 288 | margin-top: 0.8em; |
| 289 | margin-bottom: 0.8em; |
| 290 | } |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 291 | div.hdlist tr { |
| 292 | padding-bottom: 15px; |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 293 | } |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 294 | dt.hdlist1.strong, td.hdlist1.strong { |
| 295 | font-weight: bold; |
| 296 | } |
| 297 | td.hdlist1 { |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 298 | vertical-align: top; |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 299 | font-style: normal; |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 300 | padding-right: 0.8em; |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 301 | color: navy; |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 302 | } |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 303 | td.hdlist2 { |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 304 | vertical-align: top; |
| 305 | } |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 306 | div.hdlist.compact tr { |
| 307 | margin: 0; |
| 308 | padding-bottom: 0; |
| 309 | } |
| 310 | |
| 311 | .comment { |
| 312 | background: yellow; |
| 313 | } |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 314 | |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 315 | .footnote, .footnoteref { |
| 316 | font-size: 0.8em; |
| 317 | } |
| 318 | |
| 319 | span.footnote, span.footnoteref { |
| 320 | vertical-align: super; |
| 321 | } |
| 322 | |
| 323 | #footnotes { |
| 324 | margin: 20px 0 20px 0; |
| 325 | padding: 7px 0 0 0; |
| 326 | } |
| 327 | |
| 328 | #footnotes div.footnote { |
| 329 | margin: 0 0 5px 0; |
| 330 | } |
| 331 | |
| 332 | #footnotes hr { |
| 333 | border: none; |
| 334 | border-top: 1px solid silver; |
| 335 | height: 1px; |
| 336 | text-align: left; |
| 337 | margin-left: 0; |
| 338 | width: 20%; |
| 339 | min-width: 100px; |
| 340 | } |
| 341 | |
| 342 | |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 343 | @media print { |
| 344 | div#footer-badges { display: none; } |
| 345 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 346 | |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 347 | div#toc { |
| 348 | margin-bottom: 2.5em; |
| 349 | } |
| 350 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 351 | div#toctitle { |
| 352 | color: #527bbd; |
| 353 | font-family: sans-serif; |
| 354 | font-size: 1.1em; |
| 355 | font-weight: bold; |
| 356 | margin-top: 1.0em; |
| 357 | margin-bottom: 0.1em; |
| 358 | } |
| 359 | |
| 360 | div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { |
| 361 | margin-top: 0; |
| 362 | margin-bottom: 0; |
| 363 | } |
| 364 | div.toclevel2 { |
| 365 | margin-left: 2em; |
| 366 | font-size: 0.9em; |
| 367 | } |
| 368 | div.toclevel3 { |
| 369 | margin-left: 4em; |
| 370 | font-size: 0.9em; |
| 371 | } |
| 372 | div.toclevel4 { |
| 373 | margin-left: 6em; |
| 374 | font-size: 0.9em; |
| 375 | } |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 376 | /* Overrides for manpage documents */ |
| 377 | h1 { |
| 378 | padding-top: 0.5em; |
| 379 | padding-bottom: 0.5em; |
| 380 | border-top: 2px solid silver; |
| 381 | border-bottom: 2px solid silver; |
| 382 | } |
| 383 | h2 { |
| 384 | border-style: none; |
| 385 | } |
| 386 | div.sectionbody { |
| 387 | margin-left: 5%; |
| 388 | } |
| 389 | |
| 390 | @media print { |
| 391 | div#toc { display: none; } |
| 392 | } |
| 393 | |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 394 | /* Workarounds for IE6's broken and incomplete CSS2. */ |
| 395 | |
| 396 | div.sidebar-content { |
| 397 | background: #ffffee; |
| 398 | border: 1px solid silver; |
| 399 | padding: 0.5em; |
| 400 | } |
| 401 | div.sidebar-title, div.image-title { |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 402 | color: #527bbd; |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 403 | font-family: sans-serif; |
| 404 | font-weight: bold; |
| 405 | margin-top: 0.0em; |
| 406 | margin-bottom: 0.5em; |
| 407 | } |
| 408 | |
| 409 | div.listingblock div.content { |
| 410 | border: 1px solid silver; |
| 411 | background: #f4f4f4; |
| 412 | padding: 0.5em; |
| 413 | } |
| 414 | |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 415 | div.quoteblock-attribution { |
| 416 | padding-top: 0.5em; |
| 417 | text-align: right; |
| 418 | } |
| 419 | |
| 420 | div.verseblock-content { |
| 421 | white-space: pre; |
| 422 | } |
| 423 | div.verseblock-attribution { |
| 424 | padding-top: 0.75em; |
| 425 | text-align: left; |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 426 | } |
| 427 | |
| 428 | div.exampleblock-content { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 429 | border-left: 3px solid #dddddd; |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 430 | padding-left: 0.5em; |
| 431 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 432 | |
| 433 | /* IE6 sets dynamically generated links as visited. */ |
| 434 | div#toc a:visited { color: blue; } |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 435 | </style> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 436 | <script type="text/javascript"> |
| 437 | /*<+'])'); |
| 481 | // Function that scans the DOM tree for header elements (the DOM2 |
| 482 | // nodeIterator API would be a better technique but not supported by all |
| 483 | // browsers). |
| 484 | var iterate = function (el) { |
| 485 | for (var i = el.firstChild; i != null; i = i.nextSibling) { |
| 486 | if (i.nodeType == 1 /* Node.ELEMENT_NODE */) { |
| 487 | var mo = re.exec(i.tagName); |
| 488 | if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") { |
| 489 | result[result.length] = new TocEntry(i, getText(i), mo[1]-1); |
| 490 | } |
| 491 | iterate(i); |
| 492 | } |
| 493 | } |
| 494 | } |
| 495 | iterate(el); |
| 496 | return result; |
| 497 | } |
| 498 | |
| 499 | var toc = document.getElementById("toc"); |
| 500 | var entries = tocEntries(document.getElementById("content"), toclevels); |
| 501 | for (var i = 0; i < entries.length; ++i) { |
| 502 | var entry = entries[i]; |
| 503 | if (entry.element.id == "") |
| 504 | entry.element.id = "_toc_" + i; |
| 505 | var a = document.createElement("a"); |
| 506 | a.href = "#" + entry.element.id; |
| 507 | a.appendChild(document.createTextNode(entry.text)); |
| 508 | var div = document.createElement("div"); |
| 509 | div.appendChild(a); |
| 510 | div.className = "toclevel" + entry.toclevel; |
| 511 | toc.appendChild(div); |
| 512 | } |
| 513 | if (entries.length == 0) |
| 514 | toc.parentNode.removeChild(toc); |
| 515 | }, |
| 516 | |
| 517 | |
| 518 | ///////////////////////////////////////////////////////////////////// |
| 519 | // Footnotes generator |
| 520 | ///////////////////////////////////////////////////////////////////// |
| 521 | |
| 522 | /* Based on footnote generation code from: |
| 523 | * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html |
| 524 | */ |
| 525 | |
| 526 | footnotes: function () { |
| 527 | var cont = document.getElementById("content"); |
| 528 | var noteholder = document.getElementById("footnotes"); |
| 529 | var spans = cont.getElementsByTagName("span"); |
| 530 | var refs = {}; |
| 531 | var n = 0; |
| 532 | for (i=0; i<spans.length; i++) { |
| 533 | if (spans[i].className == "footnote") { |
| 534 | n++; |
| 535 | // Use [\s\S] in place of . so multi-line matches work. |
| 536 | // Because JavaScript has no s (dotall) regex flag. |
| 537 | note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1]; |
| 538 | noteholder.innerHTML += |
| 539 | "<div class='footnote' id='_footnote_" + n + "'>" + |
| 540 | "<a href='#_footnoteref_" + n + "' title='Return to text'>" + |
| 541 | n + "</a>. " + note + "</div>"; |
| 542 | spans[i].innerHTML = |
| 543 | "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n + |
| 544 | "' title='View footnote' class='footnote'>" + n + "</a>]"; |
| 545 | var id =spans[i].getAttribute("id"); |
| 546 | if (id != null) refs["#"+id] = n; |
| 547 | } |
| 548 | } |
| 549 | if (n == 0) |
| 550 | noteholder.parentNode.removeChild(noteholder); |
| 551 | else { |
| 552 | // Process footnoterefs. |
| 553 | for (i=0; i<spans.length; i++) { |
| 554 | if (spans[i].className == "footnoteref") { |
| 555 | var href = spans[i].getElementsByTagName("a")[0].getAttribute("href"); |
| 556 | href = href.match(/#.*/)[0]; // Because IE return full URL. |
| 557 | n = refs[href]; |
| 558 | spans[i].innerHTML = |
| 559 | "[<a href='#_footnote_" + n + |
| 560 | "' title='View footnote' class='footnote'>" + n + "</a>]"; |
| 561 | } |
| 562 | } |
| 563 | } |
| 564 | } |
| 565 | |
| 566 | } |
| 567 | /*]]>*/ |
| 568 | </script> |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 569 | </head> |
| 570 | <body> |
| 571 | <div id="header"> |
| 572 | <h1> |
| 573 | git-blame(1) Manual Page |
| 574 | </h1> |
| 575 | <h2>NAME</h2> |
| 576 | <div class="sectionbody"> |
| 577 | <p>git-blame - |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 578 | Show what revision and author last modified each line of a file |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 579 | </p> |
| 580 | </div> |
| 581 | </div> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 582 | <div id="content"> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 583 | <h2 id="_synopsis">SYNOPSIS</h2> |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 584 | <div class="sectionbody"> |
Junio C Hamano | e1aa747 | 2006-11-09 07:37:50 | [diff] [blame] | 585 | <div class="verseblock"> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 586 | <div class="verseblock-content"><em>git blame</em> [-c] [-b] [-l] [--root] [-t] [-f] [-n] [-s] [-e] [-p] [-w] [--incremental] [-L n,m] |
Junio C Hamano | 209ebe8 | 2011-04-27 21:09:59 | [diff] [blame] | 587 | [-S <revs-file>] [-M] [-C] [-C] [-C] [--since=<date>] [--abbrev=<n>] |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 588 | [<rev> | --contents <file> | --reverse <rev>] [--] <file></div> |
| 589 | <div class="verseblock-attribution"> |
| 590 | </div></div> |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 591 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 592 | <h2 id="_description">DESCRIPTION</h2> |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 593 | <div class="sectionbody"> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 594 | <div class="paragraph"><p>Annotates each line in the given file with information from the revision which |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 595 | last modified the line. Optionally, start annotating from the given revision.</p></div> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 596 | <div class="paragraph"><p>The command can also limit the range of lines annotated.</p></div> |
| 597 | <div class="paragraph"><p>The report does not tell you anything about lines which have been deleted or |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 598 | replaced; you need to use a tool such as <em>git diff</em> or the "pickaxe" |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 599 | interface briefly mentioned in the following paragraph.</p></div> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 600 | <div class="paragraph"><p>Apart from supporting file annotation, git also supports searching the |
Junio C Hamano | f9771f6 | 2007-01-17 17:42:30 | [diff] [blame] | 601 | development history for when a code snippet occurred in a change. This makes it |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 602 | possible to track when a code snippet was added to a file, moved or copied |
| 603 | between files, and eventually deleted or replaced. It works by searching for |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 604 | a text string in the diff. A small example:</p></div> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 605 | <div class="listingblock"> |
| 606 | <div class="content"> |
| 607 | <pre><tt>$ git log --pretty=oneline -S'blame_usage' |
| 608 | 5040f17eba15504bad66b14a645bddd9b015ebb7 blame -S <ancestry-file> |
| 609 | ea4c7f9bf69e781dd0cd88d2bccb2bf5cc15c9a7 git-blame: Make the output</tt></pre> |
| 610 | </div></div> |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 611 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 612 | <h2 id="_options">OPTIONS</h2> |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 613 | <div class="sectionbody"> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 614 | <div class="dlist"><dl> |
| 615 | <dt class="hdlist1"> |
Junio C Hamano | 0e3cb53 | 2007-04-17 08:28:11 | [diff] [blame] | 616 | -b |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 617 | </dt> |
| 618 | <dd> |
| 619 | <p> |
Junio C Hamano | 0e3cb53 | 2007-04-17 08:28:11 | [diff] [blame] | 620 | Show blank SHA-1 for boundary commits. This can also |
| 621 | be controlled via the <tt>blame.blankboundary</tt> config option. |
| 622 | </p> |
| 623 | </dd> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 624 | <dt class="hdlist1"> |
Junio C Hamano | 0e3cb53 | 2007-04-17 08:28:11 | [diff] [blame] | 625 | --root |
| 626 | </dt> |
| 627 | <dd> |
| 628 | <p> |
| 629 | Do not treat root commits as boundaries. This can also be |
| 630 | controlled via the <tt>blame.showroot</tt> config option. |
| 631 | </p> |
| 632 | </dd> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 633 | <dt class="hdlist1"> |
Junio C Hamano | 0e3cb53 | 2007-04-17 08:28:11 | [diff] [blame] | 634 | --show-stats |
| 635 | </dt> |
| 636 | <dd> |
| 637 | <p> |
| 638 | Include additional statistics at the end of blame output. |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 639 | </p> |
| 640 | </dd> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 641 | <dt class="hdlist1"> |
Junio C Hamano | 9882a52 | 2007-04-27 08:22:22 | [diff] [blame] | 642 | -L <start>,<end> |
Junio C Hamano | e1aa747 | 2006-11-09 07:37:50 | [diff] [blame] | 643 | </dt> |
| 644 | <dd> |
| 645 | <p> |
Junio C Hamano | 9882a52 | 2007-04-27 08:22:22 | [diff] [blame] | 646 | Annotate only the given line range. <start> and <end> can take |
| 647 | one of these forms: |
Junio C Hamano | e1aa747 | 2006-11-09 07:37:50 | [diff] [blame] | 648 | </p> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 649 | <div class="ulist"><ul> |
Junio C Hamano | 9882a52 | 2007-04-27 08:22:22 | [diff] [blame] | 650 | <li> |
| 651 | <p> |
| 652 | number |
| 653 | </p> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 654 | <div class="paragraph"><p>If <start> or <end> is a number, it specifies an |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 655 | absolute line number (lines count from 1).</p></div> |
Junio C Hamano | 9882a52 | 2007-04-27 08:22:22 | [diff] [blame] | 656 | </li> |
| 657 | <li> |
| 658 | <p> |
| 659 | /regex/ |
| 660 | </p> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 661 | <div class="paragraph"><p>This form will use the first line matching the given |
Junio C Hamano | 9882a52 | 2007-04-27 08:22:22 | [diff] [blame] | 662 | POSIX regex. If <end> is a regex, it will search |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 663 | starting at the line given by <start>.</p></div> |
Junio C Hamano | 9882a52 | 2007-04-27 08:22:22 | [diff] [blame] | 664 | </li> |
| 665 | <li> |
| 666 | <p> |
| 667 | +offset or -offset |
| 668 | </p> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 669 | <div class="paragraph"><p>This is only valid for <end> and will specify a number |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 670 | of lines before or after the line given by <start>.</p></div> |
Junio C Hamano | 9882a52 | 2007-04-27 08:22:22 | [diff] [blame] | 671 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 672 | </ul></div> |
Junio C Hamano | e1aa747 | 2006-11-09 07:37:50 | [diff] [blame] | 673 | </dd> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 674 | <dt class="hdlist1"> |
Junio C Hamano | 0e3cb53 | 2007-04-17 08:28:11 | [diff] [blame] | 675 | -l |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 676 | </dt> |
| 677 | <dd> |
| 678 | <p> |
Junio C Hamano | 3fd90c8 | 2006-06-18 00:22:01 | [diff] [blame] | 679 | Show long rev (Default: off). |
| 680 | </p> |
| 681 | </dd> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 682 | <dt class="hdlist1"> |
Junio C Hamano | 0e3cb53 | 2007-04-17 08:28:11 | [diff] [blame] | 683 | -t |
Junio C Hamano | 3fd90c8 | 2006-06-18 00:22:01 | [diff] [blame] | 684 | </dt> |
| 685 | <dd> |
| 686 | <p> |
| 687 | Show raw timestamp (Default: off). |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 688 | </p> |
| 689 | </dd> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 690 | <dt class="hdlist1"> |
Junio C Hamano | 0e3cb53 | 2007-04-17 08:28:11 | [diff] [blame] | 691 | -S <revs-file> |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 692 | </dt> |
| 693 | <dd> |
| 694 | <p> |
Junio C Hamano | fd83b8e | 2009-03-22 08:21:41 | [diff] [blame] | 695 | Use revisions from revs-file instead of calling <a href="git-rev-list.html">git-rev-list(1)</a>. |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 696 | </p> |
| 697 | </dd> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 698 | <dt class="hdlist1"> |
Junio C Hamano | a6455f6 | 2009-02-20 08:33:08 | [diff] [blame] | 699 | --reverse |
| 700 | </dt> |
| 701 | <dd> |
| 702 | <p> |
| 703 | Walk history forward instead of backward. Instead of showing |
| 704 | the revision in which a line appeared, this shows the last |
| 705 | revision in which a line has existed. This requires a range of |
| 706 | revision like START..END where the path to blame exists in |
| 707 | START. |
| 708 | </p> |
| 709 | </dd> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 710 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 711 | -p |
| 712 | </dt> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 713 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 714 | --porcelain |
Junio C Hamano | ff4b431 | 2006-10-25 22:55:31 | [diff] [blame] | 715 | </dt> |
| 716 | <dd> |
| 717 | <p> |
| 718 | Show in a format designed for machine consumption. |
| 719 | </p> |
| 720 | </dd> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 721 | <dt class="hdlist1"> |
Junio C Hamano | 2a294cd | 2011-05-23 23:06:31 | [diff] [blame] | 722 | --line-porcelain |
| 723 | </dt> |
| 724 | <dd> |
| 725 | <p> |
| 726 | Show the porcelain format, but output commit information for |
| 727 | each line, not just the first time a commit is referenced. |
| 728 | Implies --porcelain. |
| 729 | </p> |
| 730 | </dd> |
| 731 | <dt class="hdlist1"> |
Junio C Hamano | 5a70233 | 2007-01-28 20:55:22 | [diff] [blame] | 732 | --incremental |
| 733 | </dt> |
| 734 | <dd> |
| 735 | <p> |
| 736 | Show the result incrementally in a format designed for |
| 737 | machine consumption. |
| 738 | </p> |
| 739 | </dd> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 740 | <dt class="hdlist1"> |
Junio C Hamano | aa17c7c | 2008-11-03 04:36:58 | [diff] [blame] | 741 | --encoding=<encoding> |
| 742 | </dt> |
| 743 | <dd> |
| 744 | <p> |
| 745 | Specifies the encoding used to output author names |
| 746 | and commit summaries. Setting it to <tt>none</tt> makes blame |
| 747 | output unconverted data. For more information see the |
| 748 | discussion about encoding in the <a href="git-log.html">git-log(1)</a> |
| 749 | manual page. |
| 750 | </p> |
| 751 | </dd> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 752 | <dt class="hdlist1"> |
Junio C Hamano | 42f855f | 2007-02-06 00:09:38 | [diff] [blame] | 753 | --contents <file> |
| 754 | </dt> |
| 755 | <dd> |
| 756 | <p> |
| 757 | When <rev> is not specified, the command annotates the |
| 758 | changes starting backwards from the working tree copy. |
| 759 | This flag makes the command pretend as if the working |
Junio C Hamano | 49dccaf | 2008-02-10 10:48:01 | [diff] [blame] | 760 | tree copy has the contents of the named file (specify |
Junio C Hamano | 42f855f | 2007-02-06 00:09:38 | [diff] [blame] | 761 | <tt>-</tt> to make the command read from the standard input). |
| 762 | </p> |
| 763 | </dd> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 764 | <dt class="hdlist1"> |
Junio C Hamano | ea6a764 | 2009-03-11 23:56:19 | [diff] [blame] | 765 | --date <format> |
| 766 | </dt> |
| 767 | <dd> |
| 768 | <p> |
| 769 | The value is one of the following alternatives: |
| 770 | {relative,local,default,iso,rfc,short}. If --date is not |
| 771 | provided, the value of the blame.date config variable is |
| 772 | used. If the blame.date config variable is also not set, the |
| 773 | iso format is used. For more information, See the discussion |
| 774 | of the --date option at <a href="git-log.html">git-log(1)</a>. |
| 775 | </p> |
| 776 | </dd> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 777 | <dt class="hdlist1"> |
Junio C Hamano | 0e3cb53 | 2007-04-17 08:28:11 | [diff] [blame] | 778 | -M|<num>| |
Junio C Hamano | e1aa747 | 2006-11-09 07:37:50 | [diff] [blame] | 779 | </dt> |
| 780 | <dd> |
| 781 | <p> |
Junio C Hamano | 0e8c0b0 | 2010-04-12 15:45:55 | [diff] [blame] | 782 | Detect moved or copied lines within a file. When a commit |
| 783 | moves or copies a block of lines (e.g. the original file |
| 784 | has A and then B, and the commit changes it to B and then |
| 785 | A), the traditional <em>blame</em> algorithm notices only half of |
| 786 | the movement and typically blames the lines that were moved |
| 787 | up (i.e. B) to the parent and assigns blame to the lines that |
| 788 | were moved down (i.e. A) to the child commit. With this |
| 789 | option, both groups of lines are blamed on the parent by |
| 790 | running extra passes of inspection. |
Junio C Hamano | e1aa747 | 2006-11-09 07:37:50 | [diff] [blame] | 791 | </p> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 792 | <div class="paragraph"><p><num> is optional but it is the lower bound on the number of |
Junio C Hamano | cc7636a | 2010-05-21 14:57:53 | [diff] [blame] | 793 | alphanumeric characters that git must detect as moving/copying |
Junio C Hamano | 0e3cb53 | 2007-04-17 08:28:11 | [diff] [blame] | 794 | within a file for it to associate those lines with the parent |
Junio C Hamano | cc7636a | 2010-05-21 14:57:53 | [diff] [blame] | 795 | commit. The default value is 20.</p></div> |
Junio C Hamano | e1aa747 | 2006-11-09 07:37:50 | [diff] [blame] | 796 | </dd> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 797 | <dt class="hdlist1"> |
Junio C Hamano | 0e3cb53 | 2007-04-17 08:28:11 | [diff] [blame] | 798 | -C|<num>| |
Junio C Hamano | e1aa747 | 2006-11-09 07:37:50 | [diff] [blame] | 799 | </dt> |
| 800 | <dd> |
| 801 | <p> |
Junio C Hamano | 0e8c0b0 | 2010-04-12 15:45:55 | [diff] [blame] | 802 | In addition to <tt>-M</tt>, detect lines moved or copied from other |
Junio C Hamano | e1aa747 | 2006-11-09 07:37:50 | [diff] [blame] | 803 | files that were modified in the same commit. This is |
| 804 | useful when you reorganize your program and move code |
| 805 | around across files. When this option is given twice, |
Junio C Hamano | 5ca1dd1 | 2010-01-17 02:44:04 | [diff] [blame] | 806 | the command additionally looks for copies from other |
| 807 | files in the commit that creates the file. When this |
| 808 | option is given three times, the command additionally |
| 809 | looks for copies from other files in any commit. |
Junio C Hamano | e1aa747 | 2006-11-09 07:37:50 | [diff] [blame] | 810 | </p> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 811 | <div class="paragraph"><p><num> is optional but it is the lower bound on the number of |
Junio C Hamano | cc7636a | 2010-05-21 14:57:53 | [diff] [blame] | 812 | alphanumeric characters that git must detect as moving/copying |
Junio C Hamano | 0e3cb53 | 2007-04-17 08:28:11 | [diff] [blame] | 813 | between files for it to associate those lines with the parent |
Junio C Hamano | cc7636a | 2010-05-21 14:57:53 | [diff] [blame] | 814 | commit. And the default value is 40. If there are more than one |
| 815 | <tt>-C</tt> options given, the <num> argument of the last <tt>-C</tt> will |
| 816 | take effect.</p></div> |
Junio C Hamano | e1aa747 | 2006-11-09 07:37:50 | [diff] [blame] | 817 | </dd> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 818 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 819 | -h |
| 820 | </dt> |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 821 | <dd> |
| 822 | <p> |
| 823 | Show help message. |
| 824 | </p> |
| 825 | </dd> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 826 | <dt class="hdlist1"> |
Junio C Hamano | 0e3cb53 | 2007-04-17 08:28:11 | [diff] [blame] | 827 | -c |
| 828 | </dt> |
| 829 | <dd> |
| 830 | <p> |
| 831 | Use the same output mode as <a href="git-annotate.html">git-annotate(1)</a> (Default: off). |
| 832 | </p> |
| 833 | </dd> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 834 | <dt class="hdlist1"> |
Junio C Hamano | 0e3cb53 | 2007-04-17 08:28:11 | [diff] [blame] | 835 | --score-debug |
| 836 | </dt> |
| 837 | <dd> |
| 838 | <p> |
| 839 | Include debugging information related to the movement of |
| 840 | lines between files (see <tt>-C</tt>) and lines moved within a |
| 841 | file (see <tt>-M</tt>). The first number listed is the score. |
| 842 | This is the number of alphanumeric characters detected |
Junio C Hamano | fd83b8e | 2009-03-22 08:21:41 | [diff] [blame] | 843 | as having been moved between or within files. This must be above |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 844 | a certain threshold for <em>git blame</em> to consider those lines |
Junio C Hamano | 0e3cb53 | 2007-04-17 08:28:11 | [diff] [blame] | 845 | of code to have been moved. |
| 846 | </p> |
| 847 | </dd> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 848 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 849 | -f |
| 850 | </dt> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 851 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 852 | --show-name |
Junio C Hamano | 0e3cb53 | 2007-04-17 08:28:11 | [diff] [blame] | 853 | </dt> |
| 854 | <dd> |
| 855 | <p> |
Junio C Hamano | fd83b8e | 2009-03-22 08:21:41 | [diff] [blame] | 856 | Show the filename in the original commit. By default |
| 857 | the filename is shown if there is any line that came from a |
| 858 | file with a different name, due to rename detection. |
Junio C Hamano | 0e3cb53 | 2007-04-17 08:28:11 | [diff] [blame] | 859 | </p> |
| 860 | </dd> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 861 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 862 | -n |
| 863 | </dt> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 864 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 865 | --show-number |
Junio C Hamano | 0e3cb53 | 2007-04-17 08:28:11 | [diff] [blame] | 866 | </dt> |
| 867 | <dd> |
| 868 | <p> |
Junio C Hamano | fd83b8e | 2009-03-22 08:21:41 | [diff] [blame] | 869 | Show the line number in the original commit (Default: off). |
Junio C Hamano | 0e3cb53 | 2007-04-17 08:28:11 | [diff] [blame] | 870 | </p> |
| 871 | </dd> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 872 | <dt class="hdlist1"> |
Junio C Hamano | 469d60e | 2007-04-29 18:30:34 | [diff] [blame] | 873 | -s |
| 874 | </dt> |
| 875 | <dd> |
| 876 | <p> |
Junio C Hamano | fd83b8e | 2009-03-22 08:21:41 | [diff] [blame] | 877 | Suppress the author name and timestamp from the output. |
Junio C Hamano | 469d60e | 2007-04-29 18:30:34 | [diff] [blame] | 878 | </p> |
| 879 | </dd> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 880 | <dt class="hdlist1"> |
| 881 | -e |
| 882 | </dt> |
| 883 | <dt class="hdlist1"> |
| 884 | --show-email |
| 885 | </dt> |
| 886 | <dd> |
| 887 | <p> |
| 888 | Show the author email instead of author name (Default: off). |
| 889 | </p> |
| 890 | </dd> |
| 891 | <dt class="hdlist1"> |
Junio C Hamano | 9e52d4e | 2007-06-13 08:29:33 | [diff] [blame] | 892 | -w |
| 893 | </dt> |
| 894 | <dd> |
| 895 | <p> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 896 | Ignore whitespace when comparing the parent’s version and |
| 897 | the child’s to find where the lines came from. |
Junio C Hamano | 9e52d4e | 2007-06-13 08:29:33 | [diff] [blame] | 898 | </p> |
| 899 | </dd> |
Junio C Hamano | 209ebe8 | 2011-04-27 21:09:59 | [diff] [blame] | 900 | <dt class="hdlist1"> |
| 901 | --abbrev=<n> |
| 902 | </dt> |
| 903 | <dd> |
| 904 | <p> |
| 905 | Instead of using the default 7+1 hexadecimal digits as the |
| 906 | abbreviated object name, use <n>+1 digits. Note that 1 column |
| 907 | is used for a caret to mark the boundary commit. |
| 908 | </p> |
| 909 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 910 | </dl></div> |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 911 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 912 | <h2 id="_the_porcelain_format">THE PORCELAIN FORMAT</h2> |
Junio C Hamano | ff4b431 | 2006-10-25 22:55:31 | [diff] [blame] | 913 | <div class="sectionbody"> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 914 | <div class="paragraph"><p>In this format, each line is output after a header; the |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 915 | header at the minimum has the first line which has:</p></div> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 916 | <div class="ulist"><ul> |
Junio C Hamano | ff4b431 | 2006-10-25 22:55:31 | [diff] [blame] | 917 | <li> |
| 918 | <p> |
| 919 | 40-byte SHA-1 of the commit the line is attributed to; |
| 920 | </p> |
| 921 | </li> |
| 922 | <li> |
| 923 | <p> |
| 924 | the line number of the line in the original file; |
| 925 | </p> |
| 926 | </li> |
| 927 | <li> |
| 928 | <p> |
| 929 | the line number of the line in the final file; |
| 930 | </p> |
| 931 | </li> |
| 932 | <li> |
| 933 | <p> |
Junio C Hamano | fd83b8e | 2009-03-22 08:21:41 | [diff] [blame] | 934 | on a line that starts a group of lines from a different |
Junio C Hamano | ff4b431 | 2006-10-25 22:55:31 | [diff] [blame] | 935 | commit than the previous one, the number of lines in this |
| 936 | group. On subsequent lines this field is absent. |
| 937 | </p> |
| 938 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 939 | </ul></div> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 940 | <div class="paragraph"><p>This header line is followed by the following information |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 941 | at least once for each commit:</p></div> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 942 | <div class="ulist"><ul> |
Junio C Hamano | ff4b431 | 2006-10-25 22:55:31 | [diff] [blame] | 943 | <li> |
| 944 | <p> |
Junio C Hamano | fd83b8e | 2009-03-22 08:21:41 | [diff] [blame] | 945 | the author name ("author"), email ("author-mail"), time |
Junio C Hamano | ff4b431 | 2006-10-25 22:55:31 | [diff] [blame] | 946 | ("author-time"), and timezone ("author-tz"); similarly |
| 947 | for committer. |
| 948 | </p> |
| 949 | </li> |
| 950 | <li> |
| 951 | <p> |
Junio C Hamano | fd83b8e | 2009-03-22 08:21:41 | [diff] [blame] | 952 | the filename in the commit that the line is attributed to. |
Junio C Hamano | ff4b431 | 2006-10-25 22:55:31 | [diff] [blame] | 953 | </p> |
| 954 | </li> |
| 955 | <li> |
| 956 | <p> |
| 957 | the first line of the commit log message ("summary"). |
| 958 | </p> |
| 959 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 960 | </ul></div> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 961 | <div class="paragraph"><p>The contents of the actual line is output after the above |
Junio C Hamano | ff4b431 | 2006-10-25 22:55:31 | [diff] [blame] | 962 | header, prefixed by a TAB. This is to allow adding more |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 963 | header elements later.</p></div> |
Junio C Hamano | 2a294cd | 2011-05-23 23:06:31 | [diff] [blame] | 964 | <div class="paragraph"><p>The porcelain format generally suppresses commit information that has |
| 965 | already been seen. For example, two lines that are blamed to the same |
| 966 | commit will both be shown, but the details for that commit will be shown |
| 967 | only once. This is more efficient, but may require more state be kept by |
| 968 | the reader. The <tt>--line-porcelain</tt> option can be used to output full |
| 969 | commit information for each line, allowing simpler (but less efficient) |
| 970 | usage like:</p></div> |
| 971 | <div class="literalblock"> |
| 972 | <div class="content"> |
| 973 | <pre><tt># count the number of lines attributed to each author |
| 974 | git blame --line-porcelain file | |
| 975 | sed -n 's/^author //p' | |
| 976 | sort | uniq -c | sort -rn</tt></pre> |
| 977 | </div></div> |
Junio C Hamano | ff4b431 | 2006-10-25 22:55:31 | [diff] [blame] | 978 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 979 | <h2 id="_specifying_ranges">SPECIFYING RANGES</h2> |
Junio C Hamano | e1aa747 | 2006-11-09 07:37:50 | [diff] [blame] | 980 | <div class="sectionbody"> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 981 | <div class="paragraph"><p>Unlike <em>git blame</em> and <em>git annotate</em> in older versions of git, the extent |
Junio C Hamano | fd83b8e | 2009-03-22 08:21:41 | [diff] [blame] | 982 | of the annotation can be limited to both line ranges and revision |
Junio C Hamano | e1aa747 | 2006-11-09 07:37:50 | [diff] [blame] | 983 | ranges. When you are interested in finding the origin for |
Junio C Hamano | fd83b8e | 2009-03-22 08:21:41 | [diff] [blame] | 984 | lines 40-60 for file <tt>foo</tt>, you can use the <tt>-L</tt> option like so |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 985 | (they mean the same thing — both ask for 21 lines starting at |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 986 | line 40):</p></div> |
Junio C Hamano | e1aa747 | 2006-11-09 07:37:50 | [diff] [blame] | 987 | <div class="literalblock"> |
| 988 | <div class="content"> |
Junio C Hamano | e58607f | 2007-01-17 23:27:45 | [diff] [blame] | 989 | <pre><tt>git blame -L 40,60 foo |
| 990 | git blame -L 40,+21 foo</tt></pre> |
Junio C Hamano | e1aa747 | 2006-11-09 07:37:50 | [diff] [blame] | 991 | </div></div> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 992 | <div class="paragraph"><p>Also you can use a regular expression to specify the line range:</p></div> |
Junio C Hamano | 4a345d2 | 2006-11-09 18:45:32 | [diff] [blame] | 993 | <div class="literalblock"> |
| 994 | <div class="content"> |
| 995 | <pre><tt>git blame -L '/^sub hello {/,/^}$/' foo</tt></pre> |
| 996 | </div></div> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 997 | <div class="paragraph"><p>which limits the annotation to the body of the <tt>hello</tt> subroutine.</p></div> |
| 998 | <div class="paragraph"><p>When you are not interested in changes older than version |
Junio C Hamano | e1aa747 | 2006-11-09 07:37:50 | [diff] [blame] | 999 | v2.6.18, or changes older than 3 weeks, you can use revision |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 1000 | range specifiers similar to <em>git rev-list</em>:</p></div> |
Junio C Hamano | e1aa747 | 2006-11-09 07:37:50 | [diff] [blame] | 1001 | <div class="literalblock"> |
| 1002 | <div class="content"> |
| 1003 | <pre><tt>git blame v2.6.18.. -- foo |
| 1004 | git blame --since=3.weeks -- foo</tt></pre> |
| 1005 | </div></div> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 1006 | <div class="paragraph"><p>When revision range specifiers are used to limit the annotation, |
Junio C Hamano | e1aa747 | 2006-11-09 07:37:50 | [diff] [blame] | 1007 | lines that have not changed since the range boundary (either the |
| 1008 | commit v2.6.18 or the most recent commit that is more than 3 |
| 1009 | weeks old in the above example) are blamed for that range |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1010 | boundary commit.</p></div> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 1011 | <div class="paragraph"><p>A particularly useful way is to see if an added file has lines |
Junio C Hamano | e1aa747 | 2006-11-09 07:37:50 | [diff] [blame] | 1012 | created by copy-and-paste from existing files. Sometimes this |
| 1013 | indicates that the developer was being sloppy and did not |
| 1014 | refactor the code properly. You can first find the commit that |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1015 | introduced the file with:</p></div> |
Junio C Hamano | e1aa747 | 2006-11-09 07:37:50 | [diff] [blame] | 1016 | <div class="literalblock"> |
| 1017 | <div class="content"> |
| 1018 | <pre><tt>git log --diff-filter=A --pretty=short -- foo</tt></pre> |
| 1019 | </div></div> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 1020 | <div class="paragraph"><p>and then annotate the change between the commit and its |
Junio C Hamano | b76a686 | 2012-05-02 22:02:46 | [diff] [blame] | 1021 | parents, using <tt>commit^!</tt> notation:</p></div> |
Junio C Hamano | e1aa747 | 2006-11-09 07:37:50 | [diff] [blame] | 1022 | <div class="literalblock"> |
| 1023 | <div class="content"> |
| 1024 | <pre><tt>git blame -C -C -f $commit^! -- foo</tt></pre> |
| 1025 | </div></div> |
| 1026 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1027 | <h2 id="_incremental_output">INCREMENTAL OUTPUT</h2> |
Junio C Hamano | 5a70233 | 2007-01-28 20:55:22 | [diff] [blame] | 1028 | <div class="sectionbody"> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 1029 | <div class="paragraph"><p>When called with <tt>--incremental</tt> option, the command outputs the |
Junio C Hamano | 5a70233 | 2007-01-28 20:55:22 | [diff] [blame] | 1030 | result as it is built. The output generally will talk about |
| 1031 | lines touched by more recent commits first (i.e. the lines will |
| 1032 | be annotated out of order) and is meant to be used by |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1033 | interactive viewers.</p></div> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 1034 | <div class="paragraph"><p>The output format is similar to the Porcelain format, but it |
Junio C Hamano | 5a70233 | 2007-01-28 20:55:22 | [diff] [blame] | 1035 | does not contain the actual lines from the file that is being |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1036 | annotated.</p></div> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 1037 | <div class="olist arabic"><ol class="arabic"> |
Junio C Hamano | 5a70233 | 2007-01-28 20:55:22 | [diff] [blame] | 1038 | <li> |
| 1039 | <p> |
| 1040 | Each blame entry always starts with a line of: |
| 1041 | </p> |
| 1042 | <div class="literalblock"> |
| 1043 | <div class="content"> |
| 1044 | <pre><tt><40-byte hex sha1> <sourceline> <resultline> <num_lines></tt></pre> |
| 1045 | </div></div> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 1046 | <div class="paragraph"><p>Line numbers count from 1.</p></div> |
Junio C Hamano | 5a70233 | 2007-01-28 20:55:22 | [diff] [blame] | 1047 | </li> |
| 1048 | <li> |
| 1049 | <p> |
Junio C Hamano | fd83b8e | 2009-03-22 08:21:41 | [diff] [blame] | 1050 | The first time that a commit shows up in the stream, it has various |
Junio C Hamano | 5a70233 | 2007-01-28 20:55:22 | [diff] [blame] | 1051 | other information about it printed out with a one-word tag at the |
Junio C Hamano | fd83b8e | 2009-03-22 08:21:41 | [diff] [blame] | 1052 | beginning of each line describing the extra commit information (author, |
| 1053 | email, committer, dates, summary, etc.). |
Junio C Hamano | 5a70233 | 2007-01-28 20:55:22 | [diff] [blame] | 1054 | </p> |
| 1055 | </li> |
| 1056 | <li> |
| 1057 | <p> |
Junio C Hamano | fd83b8e | 2009-03-22 08:21:41 | [diff] [blame] | 1058 | Unlike the Porcelain format, the filename information is always |
Junio C Hamano | 5a70233 | 2007-01-28 20:55:22 | [diff] [blame] | 1059 | given and terminates the entry: |
| 1060 | </p> |
| 1061 | <div class="literalblock"> |
| 1062 | <div class="content"> |
| 1063 | <pre><tt>"filename" <whitespace-quoted-filename-goes-here></tt></pre> |
| 1064 | </div></div> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 1065 | <div class="paragraph"><p>and thus it is really quite easy to parse for some line- and word-oriented |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1066 | parser (which should be quite natural for most scripting languages).</p></div> |
Junio C Hamano | 5a70233 | 2007-01-28 20:55:22 | [diff] [blame] | 1067 | <div class="admonitionblock"> |
| 1068 | <table><tr> |
| 1069 | <td class="icon"> |
| 1070 | <div class="title">Note</div> |
| 1071 | </td> |
| 1072 | <td class="content">For people who do parsing: to make it more robust, just ignore any |
Junio C Hamano | fd83b8e | 2009-03-22 08:21:41 | [diff] [blame] | 1073 | lines between the first and last one ("<sha1>" and "filename" lines) |
| 1074 | where you do not recognize the tag words (or care about that particular |
Junio C Hamano | 5a70233 | 2007-01-28 20:55:22 | [diff] [blame] | 1075 | one) at the beginning of the "extended information" lines. That way, if |
| 1076 | there is ever added information (like the commit encoding or extended |
Junio C Hamano | fd83b8e | 2009-03-22 08:21:41 | [diff] [blame] | 1077 | commit commentary), a blame viewer will not care.</td> |
Junio C Hamano | 5a70233 | 2007-01-28 20:55:22 | [diff] [blame] | 1078 | </tr></table> |
| 1079 | </div> |
| 1080 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1081 | </ol></div> |
Junio C Hamano | 5a70233 | 2007-01-28 20:55:22 | [diff] [blame] | 1082 | </div> |
Junio C Hamano | 8bc410e | 2009-02-15 10:38:19 | [diff] [blame] | 1083 | <h2 id="_mapping_authors">MAPPING AUTHORS</h2> |
| 1084 | <div class="sectionbody"> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 1085 | <div class="paragraph"><p>If the file <tt>.mailmap</tt> exists at the toplevel of the repository, or at |
Junio C Hamano | 8bc410e | 2009-02-15 10:38:19 | [diff] [blame] | 1086 | the location pointed to by the mailmap.file configuration option, it |
| 1087 | is used to map author and committer names and email addresses to |
| 1088 | canonical real names and email addresses.</p></div> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 1089 | <div class="paragraph"><p>In the simple form, each line in the file consists of the canonical |
Junio C Hamano | 8bc410e | 2009-02-15 10:38:19 | [diff] [blame] | 1090 | real name of an author, whitespace, and an email address used in the |
Junio C Hamano | fd83b8e | 2009-03-22 08:21:41 | [diff] [blame] | 1091 | commit (enclosed by <em><</em> and <em>></em>) to map to the name. For example:</p></div> |
Junio C Hamano | 8bc410e | 2009-02-15 10:38:19 | [diff] [blame] | 1092 | <div class="literalblock"> |
| 1093 | <div class="content"> |
| 1094 | <pre><tt>Proper Name <commit@email.xx></tt></pre> |
| 1095 | </div></div> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 1096 | <div class="paragraph"><p>The more complex forms are:</p></div> |
Junio C Hamano | 8bc410e | 2009-02-15 10:38:19 | [diff] [blame] | 1097 | <div class="literalblock"> |
| 1098 | <div class="content"> |
| 1099 | <pre><tt><proper@email.xx> <commit@email.xx></tt></pre> |
| 1100 | </div></div> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 1101 | <div class="paragraph"><p>which allows mailmap to replace only the email part of a commit, and:</p></div> |
Junio C Hamano | 8bc410e | 2009-02-15 10:38:19 | [diff] [blame] | 1102 | <div class="literalblock"> |
| 1103 | <div class="content"> |
| 1104 | <pre><tt>Proper Name <proper@email.xx> <commit@email.xx></tt></pre> |
| 1105 | </div></div> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 1106 | <div class="paragraph"><p>which allows mailmap to replace both the name and the email of a |
Junio C Hamano | fd83b8e | 2009-03-22 08:21:41 | [diff] [blame] | 1107 | commit matching the specified commit email address, and:</p></div> |
Junio C Hamano | 8bc410e | 2009-02-15 10:38:19 | [diff] [blame] | 1108 | <div class="literalblock"> |
| 1109 | <div class="content"> |
| 1110 | <pre><tt>Proper Name <proper@email.xx> Commit Name <commit@email.xx></tt></pre> |
| 1111 | </div></div> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 1112 | <div class="paragraph"><p>which allows mailmap to replace both the name and the email of a |
Junio C Hamano | 8bc410e | 2009-02-15 10:38:19 | [diff] [blame] | 1113 | commit matching both the specified commit name and email address.</p></div> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 1114 | <div class="paragraph"><p>Example 1: Your history contains commits by two authors, Jane |
Junio C Hamano | 8bc410e | 2009-02-15 10:38:19 | [diff] [blame] | 1115 | and Joe, whose names appear in the repository under several forms:</p></div> |
| 1116 | <div class="listingblock"> |
| 1117 | <div class="content"> |
| 1118 | <pre><tt>Joe Developer <joe@example.com> |
| 1119 | Joe R. Developer <joe@example.com> |
| 1120 | Jane Doe <jane@example.com> |
| 1121 | Jane Doe <jane@laptop.(none)> |
| 1122 | Jane D. <jane@desktop.(none)></tt></pre> |
| 1123 | </div></div> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 1124 | <div class="paragraph"><p>Now suppose that Joe wants his middle name initial used, and Jane |
Junio C Hamano | 8bc410e | 2009-02-15 10:38:19 | [diff] [blame] | 1125 | prefers her family name fully spelled out. A proper <tt>.mailmap</tt> file |
| 1126 | would look like:</p></div> |
| 1127 | <div class="listingblock"> |
| 1128 | <div class="content"> |
| 1129 | <pre><tt>Jane Doe <jane@desktop.(none)> |
| 1130 | Joe R. Developer <joe@example.com></tt></pre> |
| 1131 | </div></div> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 1132 | <div class="paragraph"><p>Note how there is no need for an entry for <<a href="mailto:jane@laptop">jane@laptop</a>.(none)>, because the |
Junio C Hamano | fd83b8e | 2009-03-22 08:21:41 | [diff] [blame] | 1133 | real name of that author is already correct.</p></div> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 1134 | <div class="paragraph"><p>Example 2: Your repository contains commits from the following |
Junio C Hamano | 8bc410e | 2009-02-15 10:38:19 | [diff] [blame] | 1135 | authors:</p></div> |
| 1136 | <div class="listingblock"> |
| 1137 | <div class="content"> |
| 1138 | <pre><tt>nick1 <bugs@company.xx> |
| 1139 | nick2 <bugs@company.xx> |
| 1140 | nick2 <nick2@company.xx> |
| 1141 | santa <me@company.xx> |
| 1142 | claus <me@company.xx> |
| 1143 | CTO <cto@coompany.xx></tt></pre> |
| 1144 | </div></div> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 1145 | <div class="paragraph"><p>Then you might want a <tt>.mailmap</tt> file that looks like:</p></div> |
Junio C Hamano | 8bc410e | 2009-02-15 10:38:19 | [diff] [blame] | 1146 | <div class="listingblock"> |
| 1147 | <div class="content"> |
| 1148 | <pre><tt><cto@company.xx> <cto@coompany.xx> |
| 1149 | Some Dude <some@dude.xx> nick1 <bugs@company.xx> |
| 1150 | Other Author <other@author.xx> nick2 <bugs@company.xx> |
| 1151 | Other Author <other@author.xx> <nick2@company.xx> |
| 1152 | Santa Claus <santa.claus@northpole.xx> <me@company.xx></tt></pre> |
| 1153 | </div></div> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 1154 | <div class="paragraph"><p>Use hash <em>#</em> for comments that are either on their own line, or after |
Junio C Hamano | 8bc410e | 2009-02-15 10:38:19 | [diff] [blame] | 1155 | the email address.</p></div> |
| 1156 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1157 | <h2 id="_see_also">SEE ALSO</h2> |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 1158 | <div class="sectionbody"> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 1159 | <div class="paragraph"><p><a href="git-annotate.html">git-annotate(1)</a></p></div> |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 1160 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1161 | <h2 id="_git">GIT</h2> |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 1162 | <div class="sectionbody"> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 1163 | <div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 1164 | </div> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 1165 | </div> |
| 1166 | <div id="footnotes"><hr /></div> |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 1167 | <div id="footer"> |
| 1168 | <div id="footer-text"> |
Junio C Hamano | b76a686 | 2012-05-02 22:02:46 | [diff] [blame] | 1169 | Last updated 2012-05-02 15:00:44 PDT |
Junio C Hamano | b33fb4f | 2006-04-18 21:30:51 | [diff] [blame] | 1170 | </div> |
| 1171 | </div> |
| 1172 | </body> |
| 1173 | </html> |