Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" |
| 2 | "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> |
| 4 | <head> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [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-log(1)</title> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 8 | <style type="text/css"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [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 | 1a4e841 | 2005-12-27 08:17:23 | [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 | 1a4e841 | 2005-12-27 08:17:23 | [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 | 1a4e841 | 2005-12-27 08:17:23 | [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 | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 46 | } |
| 47 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 48 | h1, h2, h3, h4, h5, h6 { |
| 49 | color: #527bbd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [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 | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 56 | border-bottom: 2px solid silver; |
| 57 | } |
| 58 | h2 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [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 | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 67 | h5 { |
| 68 | font-size: 1.0em; |
| 69 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 70 | |
| 71 | div.sectionbody { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [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 | 9629d4f | 2012-12-19 00:28:27 | [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 | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 90 | .monospaced, code, pre { |
| 91 | font-family: "Courier New", Courier, monospace; |
| 92 | font-size: inherit; |
| 93 | color: navy; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 94 | padding: 0; |
| 95 | margin: 0; |
| 96 | } |
| 97 | |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 98 | |
| 99 | #author { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 100 | color: #527bbd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [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 | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 103 | } |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 104 | #email { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 105 | } |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 106 | #revnumber, #revdate, #revremark { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 107 | } |
| 108 | |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 109 | #footer { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [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 | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 115 | #footer-text { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 116 | float: left; |
| 117 | padding-bottom: 0.5em; |
| 118 | } |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 119 | #footer-badges { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 120 | float: right; |
| 121 | padding-bottom: 0.5em; |
| 122 | } |
| 123 | |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [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 | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 128 | div.imageblock, div.exampleblock, div.verseblock, |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [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 | 1a4e841 | 2005-12-27 08:17:23 | [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 | 1a4e841 | 2005-12-27 08:17:23 | [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 | 1a4e841 | 2005-12-27 08:17:23 | [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 | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 169 | border: 1px solid #dddddd; |
| 170 | border-left: 4px solid #f0f0f0; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 171 | padding: 0.5em; |
| 172 | } |
| 173 | |
| 174 | div.listingblock > div.content { |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 175 | border: 1px solid #dddddd; |
| 176 | border-left: 5px solid #f0f0f0; |
| 177 | background: #f8f8f8; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [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 | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 185 | border-left: 5px solid #f0f0f0; |
| 186 | color: #888; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [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 | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 191 | text-align: right; |
| 192 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 193 | |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [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 | 1a4e841 | 2005-12-27 08:17:23 | [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 | 1a4e841 | 2005-12-27 08:17:23 | [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 | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 223 | } |
| 224 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 225 | div.imageblock div.content { padding-left: 0; } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [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 | 1a4e841 | 2005-12-27 08:17:23 | [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 | 1a4e841 | 2005-12-27 08:17:23 | [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 | 1a4e841 | 2005-12-27 08:17:23 | [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 | 1a4e841 | 2005-12-27 08:17:23 | [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 | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 268 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [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 | 1a4e841 | 2005-12-27 08:17:23 | [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 | 1a4e841 | 2005-12-27 08:17:23 | [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 | 1a4e841 | 2005-12-27 08:17:23 | [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 | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 291 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 292 | td.hdlist2 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [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 | 1a4e841 | 2005-12-27 08:17:23 | [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 | 9629d4f | 2012-12-19 00:28:27 | [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 | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 338 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 339 | |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [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 | 9629d4f | 2012-12-19 00:28:27 | [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 | 9629d4f | 2012-12-19 00:28:27 | [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 | 9629d4f | 2012-12-19 00:28:27 | [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 | 9629d4f | 2012-12-19 00:28:27 | [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 | 9629d4f | 2012-12-19 00:28:27 | [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 | 9629d4f | 2012-12-19 00:28:27 | [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 | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 535 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [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 | 9629d4f | 2012-12-19 00:28:27 | [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 | 9629d4f | 2012-12-19 00:28:27 | [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 | 9629d4f | 2012-12-19 00:28:27 | [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 | 9629d4f | 2012-12-19 00:28:27 | [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 | 9629d4f | 2012-12-19 00:28:27 | [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 | 9629d4f | 2012-12-19 00:28:27 | [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 | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 728 | asciidoc.install(); |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 729 | /*]]>*/ |
| 730 | </script> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 731 | </head> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 732 | <body class="manpage"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 733 | <div id="header"> |
| 734 | <h1> |
| 735 | git-log(1) Manual Page |
| 736 | </h1> |
| 737 | <h2>NAME</h2> |
| 738 | <div class="sectionbody"> |
| 739 | <p>git-log - |
| 740 | Show commit logs |
| 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 | 9629d4f | 2012-12-19 00:28:27 | [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 | 1a4e841 | 2005-12-27 08:17:23 | [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 | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 749 | <pre class="content"><em>git log</em> [<options>] [<since>..<until>] [[--] <path>…]</pre> |
| 750 | <div class="attribution"> |
Junio C Hamano | 15567bc | 2011-07-23 00:51:59 | [diff] [blame] | 751 | </div></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 752 | </div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [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 | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 756 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 757 | <div class="paragraph"><p>Shows the commit logs.</p></div> |
| 758 | <div class="paragraph"><p>The command takes options applicable to the <em>git rev-list</em> |
Junio C Hamano | ba7c8d8 | 2006-04-15 06:17:42 | [diff] [blame] | 759 | command to control what is shown and how, and options applicable to |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 760 | the <em>git diff-*</em> commands to control how the changes |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 761 | each commit introduces are shown.</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 762 | </div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 763 | </div> |
| 764 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 765 | <h2 id="_options">OPTIONS</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 766 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 767 | <div class="dlist"><dl> |
| 768 | <dt class="hdlist1"> |
Junio C Hamano | 78e3a78 | 2010-07-15 22:24:45 | [diff] [blame] | 769 | <since>..<until> |
| 770 | </dt> |
| 771 | <dd> |
| 772 | <p> |
| 773 | Show only commits between the named two commits. When |
| 774 | either <since> or <until> is omitted, it defaults to |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 775 | <code>HEAD</code>, i.e. the tip of the current branch. |
Junio C Hamano | 78e3a78 | 2010-07-15 22:24:45 | [diff] [blame] | 776 | For a more complete list of ways to spell <since> |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 777 | and <until>, see <a href="gitrevisions.html">gitrevisions(7)</a>. |
Junio C Hamano | 78e3a78 | 2010-07-15 22:24:45 | [diff] [blame] | 778 | </p> |
| 779 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 780 | <dt class="hdlist1"> |
Junio C Hamano | 78e3a78 | 2010-07-15 22:24:45 | [diff] [blame] | 781 | --follow |
| 782 | </dt> |
| 783 | <dd> |
| 784 | <p> |
| 785 | Continue listing the history of a file beyond renames |
| 786 | (works only for a single file). |
| 787 | </p> |
| 788 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 789 | <dt class="hdlist1"> |
Junio C Hamano | 78e3a78 | 2010-07-15 22:24:45 | [diff] [blame] | 790 | --no-decorate |
| 791 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 792 | <dt class="hdlist1"> |
Junio C Hamano | 78e3a78 | 2010-07-15 22:24:45 | [diff] [blame] | 793 | --decorate[=short|full|no] |
| 794 | </dt> |
| 795 | <dd> |
| 796 | <p> |
| 797 | Print out the ref names of any commits that are shown. If <em>short</em> is |
| 798 | specified, the ref name prefixes <em>refs/heads/</em>, <em>refs/tags/</em> and |
| 799 | <em>refs/remotes/</em> will not be printed. If <em>full</em> is specified, the |
| 800 | full ref name (including prefix) will be printed. The default option |
| 801 | is <em>short</em>. |
| 802 | </p> |
| 803 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 804 | <dt class="hdlist1"> |
Junio C Hamano | 78e3a78 | 2010-07-15 22:24:45 | [diff] [blame] | 805 | --source |
| 806 | </dt> |
| 807 | <dd> |
| 808 | <p> |
| 809 | Print out the ref name given on the command line by which each |
| 810 | commit was reached. |
| 811 | </p> |
| 812 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 813 | <dt class="hdlist1"> |
Junio C Hamano | ce836cc | 2013-01-21 02:01:53 | [diff] [blame] | 814 | --use-mailmap |
| 815 | </dt> |
| 816 | <dd> |
| 817 | <p> |
| 818 | Use mailmap file to map author and committer names and email |
| 819 | to canonical real names and email addresses. See |
| 820 | <a href="git-shortlog.html">git-shortlog(1)</a>. |
| 821 | </p> |
| 822 | </dd> |
| 823 | <dt class="hdlist1"> |
Junio C Hamano | 78e3a78 | 2010-07-15 22:24:45 | [diff] [blame] | 824 | --full-diff |
| 825 | </dt> |
| 826 | <dd> |
| 827 | <p> |
| 828 | Without this flag, "git log -p <path>…" shows commits that |
| 829 | touch the specified paths, and diffs about the same specified |
| 830 | paths. With this, the full diff is shown for commits that touch |
| 831 | the specified paths; this means that "<path>…" limits only |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 832 | commits, and doesn’t limit diff for those commits. |
Junio C Hamano | 78e3a78 | 2010-07-15 22:24:45 | [diff] [blame] | 833 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 834 | <div class="paragraph"><p>Note that this affects all diff-based output types, e.g. those |
Junio C Hamano | e85e36f | 2010-08-10 05:30:14 | [diff] [blame] | 835 | produced by --stat etc.</p></div> |
Junio C Hamano | 78e3a78 | 2010-07-15 22:24:45 | [diff] [blame] | 836 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 837 | <dt class="hdlist1"> |
Junio C Hamano | 78e3a78 | 2010-07-15 22:24:45 | [diff] [blame] | 838 | --log-size |
| 839 | </dt> |
| 840 | <dd> |
| 841 | <p> |
| 842 | Before the log message print out its size in bytes. Intended |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 843 | mainly for porcelain tools consumption. If Git is unable to |
Junio C Hamano | 78e3a78 | 2010-07-15 22:24:45 | [diff] [blame] | 844 | produce a valid value size is set to zero. |
| 845 | Note that only message is considered, if also a diff is shown |
| 846 | its size is not included. |
| 847 | </p> |
| 848 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 849 | <dt class="hdlist1"> |
Junio C Hamano | 78e3a78 | 2010-07-15 22:24:45 | [diff] [blame] | 850 | [--] <path>… |
| 851 | </dt> |
| 852 | <dd> |
| 853 | <p> |
Junio C Hamano | 5723afa | 2011-08-31 00:49:23 | [diff] [blame] | 854 | Show only commits that are enough to explain how the files |
| 855 | that match the specified paths came to be. See "History |
| 856 | Simplification" below for details and other simplification |
| 857 | modes. |
Junio C Hamano | 78e3a78 | 2010-07-15 22:24:45 | [diff] [blame] | 858 | </p> |
Junio C Hamano | 5723afa | 2011-08-31 00:49:23 | [diff] [blame] | 859 | <div class="paragraph"><p>To prevent confusion with options and branch names, paths may need to |
| 860 | be prefixed with "-- " to separate them from options or refnames.</p></div> |
Junio C Hamano | 78e3a78 | 2010-07-15 22:24:45 | [diff] [blame] | 861 | </dd> |
| 862 | </dl></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 863 | <div class="sect2"> |
| 864 | <h3 id="_commit_limiting">Commit Limiting</h3> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 865 | <div class="paragraph"><p>Besides specifying a range of commits that should be listed using the |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 866 | special notations explained in the description, additional commit |
Junio C Hamano | 8ce35d7 | 2012-09-18 22:30:42 | [diff] [blame] | 867 | limiting may be applied.</p></div> |
| 868 | <div class="paragraph"><p>Using more options generally further limits the output (e.g. |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 869 | <code>--since=<date1></code> limits to commits newer than <code><date1></code>, and using it |
| 870 | with <code>--grep=<pattern></code> further limits to commits whose log message |
| 871 | has a line that matches <code><pattern></code>), unless otherwise noted.</p></div> |
Junio C Hamano | 8ce35d7 | 2012-09-18 22:30:42 | [diff] [blame] | 872 | <div class="paragraph"><p>Note that these are applied before commit |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 873 | ordering and formatting options, such as <code>--reverse</code>.</p></div> |
| 874 | <div class="openblock"> |
| 875 | <div class="content"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 876 | <div class="dlist"><dl> |
| 877 | <dt class="hdlist1"> |
Junio C Hamano | 693e709 | 2012-09-12 22:56:53 | [diff] [blame] | 878 | -<number> |
| 879 | </dt> |
| 880 | <dt class="hdlist1"> |
| 881 | -n <number> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 882 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 883 | <dt class="hdlist1"> |
Junio C Hamano | b4a9ede | 2009-04-08 07:36:32 | [diff] [blame] | 884 | --max-count=<number> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 885 | </dt> |
| 886 | <dd> |
| 887 | <p> |
Junio C Hamano | c5be4cc | 2011-03-09 07:20:43 | [diff] [blame] | 888 | Limit the number of commits to output. |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 889 | </p> |
| 890 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 891 | <dt class="hdlist1"> |
Junio C Hamano | b4a9ede | 2009-04-08 07:36:32 | [diff] [blame] | 892 | --skip=<number> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 893 | </dt> |
| 894 | <dd> |
| 895 | <p> |
| 896 | Skip <em>number</em> commits before starting to show the commit output. |
| 897 | </p> |
| 898 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 899 | <dt class="hdlist1"> |
Junio C Hamano | b4a9ede | 2009-04-08 07:36:32 | [diff] [blame] | 900 | --since=<date> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 901 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 902 | <dt class="hdlist1"> |
Junio C Hamano | b4a9ede | 2009-04-08 07:36:32 | [diff] [blame] | 903 | --after=<date> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 904 | </dt> |
| 905 | <dd> |
| 906 | <p> |
| 907 | Show commits more recent than a specific date. |
| 908 | </p> |
| 909 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 910 | <dt class="hdlist1"> |
Junio C Hamano | b4a9ede | 2009-04-08 07:36:32 | [diff] [blame] | 911 | --until=<date> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 912 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 913 | <dt class="hdlist1"> |
Junio C Hamano | b4a9ede | 2009-04-08 07:36:32 | [diff] [blame] | 914 | --before=<date> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 915 | </dt> |
| 916 | <dd> |
| 917 | <p> |
| 918 | Show commits older than a specific date. |
| 919 | </p> |
| 920 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 921 | <dt class="hdlist1"> |
Junio C Hamano | b4a9ede | 2009-04-08 07:36:32 | [diff] [blame] | 922 | --author=<pattern> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 923 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 924 | <dt class="hdlist1"> |
Junio C Hamano | b4a9ede | 2009-04-08 07:36:32 | [diff] [blame] | 925 | --committer=<pattern> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 926 | </dt> |
| 927 | <dd> |
| 928 | <p> |
| 929 | Limit the commits output to ones with author/committer |
Junio C Hamano | 8ce35d7 | 2012-09-18 22:30:42 | [diff] [blame] | 930 | header lines that match the specified pattern (regular |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 931 | expression). With more than one <code>--author=<pattern></code>, |
Junio C Hamano | 8ce35d7 | 2012-09-18 22:30:42 | [diff] [blame] | 932 | commits whose author matches any of the given patterns are |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 933 | chosen (similarly for multiple <code>--committer=<pattern></code>). |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 934 | </p> |
| 935 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 936 | <dt class="hdlist1"> |
Junio C Hamano | 9954ed7 | 2012-10-03 04:54:00 | [diff] [blame] | 937 | --grep-reflog=<pattern> |
| 938 | </dt> |
| 939 | <dd> |
| 940 | <p> |
| 941 | Limit the commits output to ones with reflog entries that |
| 942 | match the specified pattern (regular expression). With |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 943 | more than one <code>--grep-reflog</code>, commits whose reflog message |
Junio C Hamano | 9954ed7 | 2012-10-03 04:54:00 | [diff] [blame] | 944 | matches any of the given patterns are chosen. It is an |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 945 | error to use this option unless <code>--walk-reflogs</code> is in use. |
Junio C Hamano | 9954ed7 | 2012-10-03 04:54:00 | [diff] [blame] | 946 | </p> |
| 947 | </dd> |
| 948 | <dt class="hdlist1"> |
Junio C Hamano | b4a9ede | 2009-04-08 07:36:32 | [diff] [blame] | 949 | --grep=<pattern> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 950 | </dt> |
| 951 | <dd> |
| 952 | <p> |
| 953 | Limit the commits output to ones with log message that |
Junio C Hamano | 8ce35d7 | 2012-09-18 22:30:42 | [diff] [blame] | 954 | matches the specified pattern (regular expression). With |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 955 | more than one <code>--grep=<pattern></code>, commits whose message |
Junio C Hamano | 8ce35d7 | 2012-09-18 22:30:42 | [diff] [blame] | 956 | matches any of the given patterns are chosen (but see |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 957 | <code>--all-match</code>). |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 958 | </p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 959 | <div class="paragraph"><p>When <code>--show-notes</code> is in effect, the message from the notes as |
Junio C Hamano | 9954ed7 | 2012-10-03 04:54:00 | [diff] [blame] | 960 | if it is part of the log message.</p></div> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 961 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 962 | <dt class="hdlist1"> |
Junio C Hamano | aa17c7c | 2008-11-03 04:36:58 | [diff] [blame] | 963 | --all-match |
| 964 | </dt> |
| 965 | <dd> |
| 966 | <p> |
| 967 | Limit the commits output to ones that match all given --grep, |
Junio C Hamano | 8ce35d7 | 2012-09-18 22:30:42 | [diff] [blame] | 968 | instead of ones that match at least one. |
Junio C Hamano | aa17c7c | 2008-11-03 04:36:58 | [diff] [blame] | 969 | </p> |
| 970 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 971 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 972 | -i |
| 973 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 974 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 975 | --regexp-ignore-case |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 976 | </dt> |
| 977 | <dd> |
| 978 | <p> |
| 979 | Match the regexp limiting patterns without regard to letters case. |
| 980 | </p> |
| 981 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 982 | <dt class="hdlist1"> |
Junio C Hamano | a129545 | 2012-11-13 22:32:04 | [diff] [blame] | 983 | --basic-regexp |
| 984 | </dt> |
| 985 | <dd> |
| 986 | <p> |
| 987 | Consider the limiting patterns to be basic regular expressions; |
| 988 | this is the default. |
| 989 | </p> |
| 990 | </dd> |
| 991 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 992 | -E |
| 993 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 994 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 995 | --extended-regexp |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 996 | </dt> |
| 997 | <dd> |
| 998 | <p> |
| 999 | Consider the limiting patterns to be extended regular expressions |
| 1000 | instead of the default basic regular expressions. |
| 1001 | </p> |
| 1002 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1003 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1004 | -F |
| 1005 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1006 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1007 | --fixed-strings |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 1008 | </dt> |
| 1009 | <dd> |
| 1010 | <p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1011 | Consider the limiting patterns to be fixed strings (don’t interpret |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 1012 | pattern as a regular expression). |
| 1013 | </p> |
| 1014 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1015 | <dt class="hdlist1"> |
Junio C Hamano | a129545 | 2012-11-13 22:32:04 | [diff] [blame] | 1016 | --perl-regexp |
| 1017 | </dt> |
| 1018 | <dd> |
| 1019 | <p> |
| 1020 | Consider the limiting patterns to be Perl-compatible regexp. |
| 1021 | Requires libpcre to be compiled in. |
| 1022 | </p> |
| 1023 | </dd> |
| 1024 | <dt class="hdlist1"> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1025 | --remove-empty |
| 1026 | </dt> |
| 1027 | <dd> |
| 1028 | <p> |
| 1029 | Stop when a given path disappears from the tree. |
| 1030 | </p> |
| 1031 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1032 | <dt class="hdlist1"> |
Junio C Hamano | 934e178 | 2009-07-16 06:59:15 | [diff] [blame] | 1033 | --merges |
| 1034 | </dt> |
| 1035 | <dd> |
| 1036 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1037 | Print only merge commits. This is exactly the same as <code>--min-parents=2</code>. |
Junio C Hamano | 934e178 | 2009-07-16 06:59:15 | [diff] [blame] | 1038 | </p> |
| 1039 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1040 | <dt class="hdlist1"> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1041 | --no-merges |
| 1042 | </dt> |
| 1043 | <dd> |
| 1044 | <p> |
Junio C Hamano | f32ce26 | 2011-03-27 07:35:11 | [diff] [blame] | 1045 | Do not print commits with more than one parent. This is |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1046 | exactly the same as <code>--max-parents=1</code>. |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1047 | </p> |
| 1048 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1049 | <dt class="hdlist1"> |
Junio C Hamano | f32ce26 | 2011-03-27 07:35:11 | [diff] [blame] | 1050 | --min-parents=<number> |
| 1051 | </dt> |
| 1052 | <dt class="hdlist1"> |
| 1053 | --max-parents=<number> |
| 1054 | </dt> |
| 1055 | <dt class="hdlist1"> |
| 1056 | --no-min-parents |
| 1057 | </dt> |
| 1058 | <dt class="hdlist1"> |
| 1059 | --no-max-parents |
| 1060 | </dt> |
| 1061 | <dd> |
| 1062 | <p> |
| 1063 | Show only commits which have at least (or at most) that many |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1064 | commits. In particular, <code>--max-parents=1</code> is the same as <code>--no-merges</code>, |
| 1065 | <code>--min-parents=2</code> is the same as <code>--merges</code>. <code>--max-parents=0</code> |
| 1066 | gives all root commits and <code>--min-parents=3</code> all octopus merges. |
Junio C Hamano | f32ce26 | 2011-03-27 07:35:11 | [diff] [blame] | 1067 | </p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1068 | <div class="paragraph"><p><code>--no-min-parents</code> and <code>--no-max-parents</code> reset these limits (to no limit) |
| 1069 | again. Equivalent forms are <code>--min-parents=0</code> (any commit has 0 or more |
| 1070 | parents) and <code>--max-parents=-1</code> (negative numbers denote no upper limit).</p></div> |
Junio C Hamano | f32ce26 | 2011-03-27 07:35:11 | [diff] [blame] | 1071 | </dd> |
| 1072 | <dt class="hdlist1"> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1073 | --first-parent |
| 1074 | </dt> |
| 1075 | <dd> |
| 1076 | <p> |
| 1077 | Follow only the first parent commit upon seeing a merge |
| 1078 | commit. This option can give a better overview when |
| 1079 | viewing the evolution of a particular topic branch, |
| 1080 | because merges into a topic branch tend to be only about |
| 1081 | adjusting to updated upstream from time to time, and |
| 1082 | this option allows you to ignore the individual commits |
| 1083 | brought in to your history by such a merge. |
| 1084 | </p> |
| 1085 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1086 | <dt class="hdlist1"> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1087 | --not |
| 1088 | </dt> |
| 1089 | <dd> |
| 1090 | <p> |
| 1091 | Reverses the meaning of the <em>^</em> prefix (or lack thereof) |
| 1092 | for all following revision specifiers, up to the next <em>--not</em>. |
| 1093 | </p> |
| 1094 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1095 | <dt class="hdlist1"> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1096 | --all |
| 1097 | </dt> |
| 1098 | <dd> |
| 1099 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1100 | Pretend as if all the refs in <code>refs/</code> are listed on the |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1101 | command line as <em><commit></em>. |
| 1102 | </p> |
| 1103 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1104 | <dt class="hdlist1"> |
Junio C Hamano | d2179ef | 2010-10-22 04:12:17 | [diff] [blame] | 1105 | --branches[=<pattern>] |
Junio C Hamano | 5081985 | 2008-11-19 02:07:56 | [diff] [blame] | 1106 | </dt> |
| 1107 | <dd> |
| 1108 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1109 | Pretend as if all the refs in <code>refs/heads</code> are listed |
Junio C Hamano | d2179ef | 2010-10-22 04:12:17 | [diff] [blame] | 1110 | on the command line as <em><commit></em>. If <em><pattern></em> is given, limit |
Junio C Hamano | 57827fb | 2010-01-23 03:02:50 | [diff] [blame] | 1111 | branches to ones matching given shell glob. If pattern lacks <em>?</em>, |
Junio C Hamano | 81d540a | 2012-03-02 19:52:47 | [diff] [blame] | 1112 | <em>*</em>, or <em>[</em>, <em>/*</em> at the end is implied. |
Junio C Hamano | 5081985 | 2008-11-19 02:07:56 | [diff] [blame] | 1113 | </p> |
| 1114 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1115 | <dt class="hdlist1"> |
Junio C Hamano | d2179ef | 2010-10-22 04:12:17 | [diff] [blame] | 1116 | --tags[=<pattern>] |
Junio C Hamano | 5081985 | 2008-11-19 02:07:56 | [diff] [blame] | 1117 | </dt> |
| 1118 | <dd> |
| 1119 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1120 | Pretend as if all the refs in <code>refs/tags</code> are listed |
Junio C Hamano | d2179ef | 2010-10-22 04:12:17 | [diff] [blame] | 1121 | on the command line as <em><commit></em>. If <em><pattern></em> is given, limit |
Junio C Hamano | 81d540a | 2012-03-02 19:52:47 | [diff] [blame] | 1122 | tags to ones matching given shell glob. If pattern lacks <em>?</em>, <em>*</em>, |
| 1123 | or <em>[</em>, <em>/*</em> at the end is implied. |
Junio C Hamano | 5081985 | 2008-11-19 02:07:56 | [diff] [blame] | 1124 | </p> |
| 1125 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1126 | <dt class="hdlist1"> |
Junio C Hamano | d2179ef | 2010-10-22 04:12:17 | [diff] [blame] | 1127 | --remotes[=<pattern>] |
Junio C Hamano | 5081985 | 2008-11-19 02:07:56 | [diff] [blame] | 1128 | </dt> |
| 1129 | <dd> |
| 1130 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1131 | Pretend as if all the refs in <code>refs/remotes</code> are listed |
Junio C Hamano | d2179ef | 2010-10-22 04:12:17 | [diff] [blame] | 1132 | on the command line as <em><commit></em>. If <em><pattern></em> is given, limit |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 1133 | remote-tracking branches to ones matching given shell glob. |
Junio C Hamano | 81d540a | 2012-03-02 19:52:47 | [diff] [blame] | 1134 | If pattern lacks <em>?</em>, <em>*</em>, or <em>[</em>, <em>/*</em> at the end is implied. |
Junio C Hamano | 57827fb | 2010-01-23 03:02:50 | [diff] [blame] | 1135 | </p> |
| 1136 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1137 | <dt class="hdlist1"> |
Junio C Hamano | d2179ef | 2010-10-22 04:12:17 | [diff] [blame] | 1138 | --glob=<glob-pattern> |
Junio C Hamano | 57827fb | 2010-01-23 03:02:50 | [diff] [blame] | 1139 | </dt> |
| 1140 | <dd> |
| 1141 | <p> |
Junio C Hamano | d2179ef | 2010-10-22 04:12:17 | [diff] [blame] | 1142 | Pretend as if all the refs matching shell glob <em><glob-pattern></em> |
Junio C Hamano | 57827fb | 2010-01-23 03:02:50 | [diff] [blame] | 1143 | are listed on the command line as <em><commit></em>. Leading <em>refs/</em>, |
Junio C Hamano | 81d540a | 2012-03-02 19:52:47 | [diff] [blame] | 1144 | is automatically prepended if missing. If pattern lacks <em>?</em>, <em>*</em>, |
| 1145 | or <em>[</em>, <em>/*</em> at the end is implied. |
Junio C Hamano | 5081985 | 2008-11-19 02:07:56 | [diff] [blame] | 1146 | </p> |
| 1147 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1148 | <dt class="hdlist1"> |
Junio C Hamano | 084228c | 2011-05-30 08:13:52 | [diff] [blame] | 1149 | --ignore-missing |
| 1150 | </dt> |
| 1151 | <dd> |
| 1152 | <p> |
| 1153 | Upon seeing an invalid object name in the input, pretend as if |
| 1154 | the bad input was not given. |
| 1155 | </p> |
| 1156 | </dd> |
| 1157 | <dt class="hdlist1"> |
Junio C Hamano | 5706e0b | 2009-11-24 10:54:16 | [diff] [blame] | 1158 | --bisect |
| 1159 | </dt> |
| 1160 | <dd> |
| 1161 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1162 | Pretend as if the bad bisection ref <code>refs/bisect/bad</code> |
| 1163 | was listed and as if it was followed by <code>--not</code> and the good |
| 1164 | bisection refs <code>refs/bisect/good-*</code> on the command |
Junio C Hamano | 5706e0b | 2009-11-24 10:54:16 | [diff] [blame] | 1165 | line. |
| 1166 | </p> |
| 1167 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1168 | <dt class="hdlist1"> |
Junio C Hamano | 5706e0b | 2009-11-24 10:54:16 | [diff] [blame] | 1169 | --stdin |
| 1170 | </dt> |
| 1171 | <dd> |
| 1172 | <p> |
| 1173 | In addition to the <em><commit></em> listed on the command |
| 1174 | line, read them from the standard input. If a <em>--</em> separator is |
| 1175 | seen, stop reading commits and start reading paths to limit the |
| 1176 | result. |
| 1177 | </p> |
| 1178 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1179 | <dt class="hdlist1"> |
Junio C Hamano | 9a2fb2d | 2011-03-23 05:40:15 | [diff] [blame] | 1180 | --cherry-mark |
| 1181 | </dt> |
| 1182 | <dd> |
| 1183 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1184 | Like <code>--cherry-pick</code> (see below) but mark equivalent commits |
| 1185 | with <code>=</code> rather than omitting them, and inequivalent ones with <code>+</code>. |
Junio C Hamano | 9a2fb2d | 2011-03-23 05:40:15 | [diff] [blame] | 1186 | </p> |
| 1187 | </dd> |
| 1188 | <dt class="hdlist1"> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1189 | --cherry-pick |
| 1190 | </dt> |
| 1191 | <dd> |
| 1192 | <p> |
| 1193 | Omit any commit that introduces the same change as |
| 1194 | another commit on the "other side" when the set of |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1195 | commits are limited with symmetric difference. |
| 1196 | </p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1197 | <div class="paragraph"><p>For example, if you have two branches, <code>A</code> and <code>B</code>, a usual way |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1198 | to list all commits on only one side of them is with |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1199 | <code>--left-right</code> (see the example below in the description of |
| 1200 | the <code>--left-right</code> option). It however shows the commits that were cherry-picked |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1201 | from the other branch (for example, "3rd on b" may be cherry-picked |
| 1202 | from branch A). With this option, such pairs of commits are |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1203 | excluded from the output.</p></div> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1204 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1205 | <dt class="hdlist1"> |
Junio C Hamano | 9a2fb2d | 2011-03-23 05:40:15 | [diff] [blame] | 1206 | --left-only |
| 1207 | </dt> |
| 1208 | <dt class="hdlist1"> |
| 1209 | --right-only |
| 1210 | </dt> |
| 1211 | <dd> |
| 1212 | <p> |
| 1213 | List only commits on the respective side of a symmetric range, |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1214 | i.e. only those which would be marked <code><</code> resp. <code>></code> by |
| 1215 | <code>--left-right</code>. |
Junio C Hamano | 9a2fb2d | 2011-03-23 05:40:15 | [diff] [blame] | 1216 | </p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1217 | <div class="paragraph"><p>For example, <code>--cherry-pick --right-only A...B</code> omits those |
| 1218 | commits from <code>B</code> which are in <code>A</code> or are patch-equivalent to a commit in |
| 1219 | <code>A</code>. In other words, this lists the <code>+</code> commits from <code>git cherry A B</code>. |
| 1220 | More precisely, <code>--cherry-pick --right-only --no-merges</code> gives the exact |
Junio C Hamano | 9a2fb2d | 2011-03-23 05:40:15 | [diff] [blame] | 1221 | list.</p></div> |
| 1222 | </dd> |
| 1223 | <dt class="hdlist1"> |
| 1224 | --cherry |
| 1225 | </dt> |
| 1226 | <dd> |
| 1227 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1228 | A synonym for <code>--right-only --cherry-mark --no-merges</code>; useful to |
Junio C Hamano | 9a2fb2d | 2011-03-23 05:40:15 | [diff] [blame] | 1229 | limit the output to the commits on our side and mark those that |
| 1230 | have been applied to the other side of a forked history with |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1231 | <code>git log --cherry upstream...mybranch</code>, similar to |
| 1232 | <code>git cherry upstream mybranch</code>. |
Junio C Hamano | 9a2fb2d | 2011-03-23 05:40:15 | [diff] [blame] | 1233 | </p> |
| 1234 | </dd> |
| 1235 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1236 | -g |
| 1237 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1238 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1239 | --walk-reflogs |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1240 | </dt> |
| 1241 | <dd> |
| 1242 | <p> |
| 1243 | Instead of walking the commit ancestry chain, walk |
| 1244 | reflog entries from the most recent one to older ones. |
| 1245 | When this option is used you cannot specify commits to |
| 1246 | exclude (that is, <em>^commit</em>, <em>commit1..commit2</em>, |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1247 | nor <em>commit1...commit2</em> notations cannot be used). |
| 1248 | </p> |
| 1249 | <div class="paragraph"><p>With <em>--pretty</em> format other than oneline (for obvious reasons), |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1250 | this causes the output to have two extra lines of information |
| 1251 | taken from the reflog. By default, <em>commit@{Nth}</em> notation is |
| 1252 | used in the output. When the starting commit is specified as |
Junio C Hamano | 1d36888 | 2008-08-11 22:03:10 | [diff] [blame] | 1253 | <em>commit@{now}</em>, output also uses <em>commit@{timestamp}</em> notation |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1254 | instead. Under <em>--pretty=oneline</em>, the commit message is |
| 1255 | prefixed with this information on the same line. |
Junio C Hamano | 1d36888 | 2008-08-11 22:03:10 | [diff] [blame] | 1256 | This option cannot be combined with <em>--reverse</em>. |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1257 | See also <a href="git-reflog.html">git-reflog(1)</a>.</p></div> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1258 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1259 | <dt class="hdlist1"> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1260 | --merge |
| 1261 | </dt> |
| 1262 | <dd> |
| 1263 | <p> |
| 1264 | After a failed merge, show refs that touch files having a |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1265 | conflict and don’t exist on all heads to merge. |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1266 | </p> |
| 1267 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1268 | <dt class="hdlist1"> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1269 | --boundary |
| 1270 | </dt> |
| 1271 | <dd> |
| 1272 | <p> |
| 1273 | Output uninteresting commits at the boundary, which are usually |
| 1274 | not shown. |
| 1275 | </p> |
| 1276 | </dd> |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1277 | </dl></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1278 | </div></div> |
| 1279 | </div> |
| 1280 | <div class="sect2"> |
| 1281 | <h3 id="_history_simplification">History Simplification</h3> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1282 | <div class="paragraph"><p>Sometimes you are only interested in parts of the history, for example the |
Junio C Hamano | 2836349 | 2008-11-14 08:26:31 | [diff] [blame] | 1283 | commits modifying a particular <path>. But there are two parts of |
| 1284 | <em>History Simplification</em>, one part is selecting the commits and the other |
| 1285 | is how to do it, as there are various strategies to simplify the history.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1286 | <div class="paragraph"><p>The following options select the commits to be shown:</p></div> |
| 1287 | <div class="dlist"><dl> |
| 1288 | <dt class="hdlist1"> |
Junio C Hamano | 2836349 | 2008-11-14 08:26:31 | [diff] [blame] | 1289 | <paths> |
| 1290 | </dt> |
| 1291 | <dd> |
| 1292 | <p> |
| 1293 | Commits modifying the given <paths> are selected. |
| 1294 | </p> |
| 1295 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1296 | <dt class="hdlist1"> |
Junio C Hamano | 2836349 | 2008-11-14 08:26:31 | [diff] [blame] | 1297 | --simplify-by-decoration |
| 1298 | </dt> |
| 1299 | <dd> |
| 1300 | <p> |
| 1301 | Commits that are referred by some branch or tag are selected. |
| 1302 | </p> |
| 1303 | </dd> |
| 1304 | </dl></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1305 | <div class="paragraph"><p>Note that extra commits can be shown to give a meaningful history.</p></div> |
| 1306 | <div class="paragraph"><p>The following options affect the way the simplification is performed:</p></div> |
| 1307 | <div class="dlist"><dl> |
| 1308 | <dt class="hdlist1"> |
Junio C Hamano | 2836349 | 2008-11-14 08:26:31 | [diff] [blame] | 1309 | Default mode |
| 1310 | </dt> |
| 1311 | <dd> |
| 1312 | <p> |
| 1313 | Simplifies the history to the simplest history explaining the |
| 1314 | final state of the tree. Simplest because it prunes some side |
| 1315 | branches if the end result is the same (i.e. merging branches |
| 1316 | with the same content) |
| 1317 | </p> |
| 1318 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1319 | <dt class="hdlist1"> |
Junio C Hamano | 2836349 | 2008-11-14 08:26:31 | [diff] [blame] | 1320 | --full-history |
| 1321 | </dt> |
| 1322 | <dd> |
| 1323 | <p> |
Junio C Hamano | 15567bc | 2011-07-23 00:51:59 | [diff] [blame] | 1324 | Same as the default mode, but does not prune some history. |
Junio C Hamano | 2836349 | 2008-11-14 08:26:31 | [diff] [blame] | 1325 | </p> |
| 1326 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1327 | <dt class="hdlist1"> |
Junio C Hamano | 2836349 | 2008-11-14 08:26:31 | [diff] [blame] | 1328 | --dense |
| 1329 | </dt> |
| 1330 | <dd> |
| 1331 | <p> |
| 1332 | Only the selected commits are shown, plus some to have a |
| 1333 | meaningful history. |
| 1334 | </p> |
| 1335 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1336 | <dt class="hdlist1"> |
Junio C Hamano | 2836349 | 2008-11-14 08:26:31 | [diff] [blame] | 1337 | --sparse |
| 1338 | </dt> |
| 1339 | <dd> |
| 1340 | <p> |
| 1341 | All commits in the simplified history are shown. |
| 1342 | </p> |
| 1343 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1344 | <dt class="hdlist1"> |
Junio C Hamano | 2836349 | 2008-11-14 08:26:31 | [diff] [blame] | 1345 | --simplify-merges |
| 1346 | </dt> |
| 1347 | <dd> |
| 1348 | <p> |
| 1349 | Additional option to <em>--full-history</em> to remove some needless |
| 1350 | merges from the resulting history, as there are no selected |
| 1351 | commits contributing to this merge. |
| 1352 | </p> |
| 1353 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1354 | <dt class="hdlist1"> |
Junio C Hamano | 89a5734 | 2010-06-22 23:22:55 | [diff] [blame] | 1355 | --ancestry-path |
| 1356 | </dt> |
| 1357 | <dd> |
| 1358 | <p> |
| 1359 | When given a range of commits to display (e.g. <em>commit1..commit2</em> |
| 1360 | or <em>commit2 ^commit1</em>), only display commits that exist |
| 1361 | directly on the ancestry chain between the <em>commit1</em> and |
| 1362 | <em>commit2</em>, i.e. commits that are both descendants of <em>commit1</em>, |
| 1363 | and ancestors of <em>commit2</em>. |
| 1364 | </p> |
| 1365 | </dd> |
Junio C Hamano | 2836349 | 2008-11-14 08:26:31 | [diff] [blame] | 1366 | </dl></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1367 | <div class="paragraph"><p>A more detailed explanation follows.</p></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1368 | <div class="paragraph"><p>Suppose you specified <code>foo</code> as the <paths>. We shall call commits |
| 1369 | that modify <code>foo</code> !TREESAME, and the rest TREESAME. (In a diff |
| 1370 | filtered for <code>foo</code>, they look different and equal, respectively.)</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1371 | <div class="paragraph"><p>In the following, we will always refer to the same example history to |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1372 | illustrate the differences between simplification settings. We assume |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1373 | that you are filtering for a file <code>foo</code> in this commit graph:</p></div> |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1374 | <div class="listingblock"> |
| 1375 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1376 | <pre><code> .-A---M---N---O---P |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1377 | / / / / / |
| 1378 | I B C D E |
| 1379 | \ / / / / |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1380 | `-------------'</code></pre> |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1381 | </div></div> |
Junio C Hamano | 360e3a1 | 2011-07-13 23:51:56 | [diff] [blame] | 1382 | <div class="paragraph"><p>The horizontal line of history A---P is taken to be the first parent of |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1383 | each merge. The commits are:</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1384 | <div class="ulist"><ul> |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1385 | <li> |
| 1386 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1387 | <code>I</code> is the initial commit, in which <code>foo</code> exists with contents |
| 1388 | "asdf", and a file <code>quux</code> exists with contents "quux". Initial |
| 1389 | commits are compared to an empty tree, so <code>I</code> is !TREESAME. |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1390 | </p> |
| 1391 | </li> |
| 1392 | <li> |
| 1393 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1394 | In <code>A</code>, <code>foo</code> contains just "foo". |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1395 | </p> |
| 1396 | </li> |
| 1397 | <li> |
| 1398 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1399 | <code>B</code> contains the same change as <code>A</code>. Its merge <code>M</code> is trivial and |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1400 | hence TREESAME to all parents. |
| 1401 | </p> |
| 1402 | </li> |
| 1403 | <li> |
| 1404 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1405 | <code>C</code> does not change <code>foo</code>, but its merge <code>N</code> changes it to "foobar", |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1406 | so it is not TREESAME to any parent. |
| 1407 | </p> |
| 1408 | </li> |
| 1409 | <li> |
| 1410 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1411 | <code>D</code> sets <code>foo</code> to "baz". Its merge <code>O</code> combines the strings from |
| 1412 | <code>N</code> and <code>D</code> to "foobarbaz"; i.e., it is not TREESAME to any parent. |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1413 | </p> |
| 1414 | </li> |
| 1415 | <li> |
| 1416 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1417 | <code>E</code> changes <code>quux</code> to "xyzzy", and its merge <code>P</code> combines the |
| 1418 | strings to "quux xyzzy". Despite appearing interesting, <code>P</code> is |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1419 | TREESAME to all parents. |
| 1420 | </p> |
| 1421 | </li> |
| 1422 | </ul></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1423 | <div class="paragraph"><p><em>rev-list</em> walks backwards through history, including or excluding |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1424 | commits based on whether <em>--full-history</em> and/or parent rewriting |
| 1425 | (via <em>--parents</em> or <em>--children</em>) are used. The following settings |
| 1426 | are available.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1427 | <div class="dlist"><dl> |
| 1428 | <dt class="hdlist1"> |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1429 | Default mode |
| 1430 | </dt> |
| 1431 | <dd> |
| 1432 | <p> |
| 1433 | Commits are included if they are not TREESAME to any parent |
| 1434 | (though this can be changed, see <em>--sparse</em> below). If the |
| 1435 | commit was a merge, and it was TREESAME to one parent, follow |
| 1436 | only that parent. (Even if there are several TREESAME |
| 1437 | parents, follow only one of them.) Otherwise, follow all |
| 1438 | parents. |
| 1439 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1440 | <div class="paragraph"><p>This results in:</p></div> |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1441 | <div class="listingblock"> |
| 1442 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1443 | <pre><code> .-A---N---O |
Junio C Hamano | 89a5734 | 2010-06-22 23:22:55 | [diff] [blame] | 1444 | / / / |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1445 | I---------D</code></pre> |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1446 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1447 | <div class="paragraph"><p>Note how the rule to only follow the TREESAME parent, if one is |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1448 | available, removed <code>B</code> from consideration entirely. <code>C</code> was |
| 1449 | considered via <code>N</code>, but is TREESAME. Root commits are compared to an |
| 1450 | empty tree, so <code>I</code> is !TREESAME.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1451 | <div class="paragraph"><p>Parent/child relations are only visible with --parents, but that does |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1452 | not affect the commits selected in default mode, so we have shown the |
| 1453 | parent lines.</p></div> |
| 1454 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1455 | <dt class="hdlist1"> |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1456 | --full-history without parent rewriting |
| 1457 | </dt> |
| 1458 | <dd> |
| 1459 | <p> |
| 1460 | This mode differs from the default in one point: always follow |
| 1461 | all parents of a merge, even if it is TREESAME to one of them. |
| 1462 | Even if more than one side of the merge has commits that are |
| 1463 | included, this does not imply that the merge itself is! In |
| 1464 | the example, we get |
| 1465 | </p> |
| 1466 | <div class="listingblock"> |
| 1467 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1468 | <pre><code> I A B N D O</code></pre> |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1469 | </div></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1470 | <div class="paragraph"><p><code>P</code> and <code>M</code> were excluded because they are TREESAME to a parent. <code>E</code>, |
| 1471 | <code>C</code> and <code>B</code> were all walked, but only <code>B</code> was !TREESAME, so the others |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1472 | do not appear.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1473 | <div class="paragraph"><p>Note that without parent rewriting, it is not really possible to talk |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1474 | about the parent/child relationships between the commits, so we show |
| 1475 | them disconnected.</p></div> |
| 1476 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1477 | <dt class="hdlist1"> |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1478 | --full-history with parent rewriting |
| 1479 | </dt> |
| 1480 | <dd> |
| 1481 | <p> |
| 1482 | Ordinary commits are only included if they are !TREESAME |
| 1483 | (though this can be changed, see <em>--sparse</em> below). |
| 1484 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1485 | <div class="paragraph"><p>Merges are always included. However, their parent list is rewritten: |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1486 | Along each parent, prune away commits that are not included |
| 1487 | themselves. This results in</p></div> |
| 1488 | <div class="listingblock"> |
| 1489 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1490 | <pre><code> .-A---M---N---O---P |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1491 | / / / / / |
| 1492 | I B / D / |
| 1493 | \ / / / / |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1494 | `-------------'</code></pre> |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1495 | </div></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1496 | <div class="paragraph"><p>Compare to <em>--full-history</em> without rewriting above. Note that <code>E</code> |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1497 | was pruned away because it is TREESAME, but the parent list of P was |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1498 | rewritten to contain <code>E</code>'s parent <code>I</code>. The same happened for <code>C</code> and |
| 1499 | <code>N</code>. Note also that <code>P</code> was included despite being TREESAME.</p></div> |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1500 | </dd> |
| 1501 | </dl></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1502 | <div class="paragraph"><p>In addition to the above settings, you can change whether TREESAME |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1503 | affects inclusion:</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1504 | <div class="dlist"><dl> |
| 1505 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1506 | --dense |
| 1507 | </dt> |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1508 | <dd> |
| 1509 | <p> |
| 1510 | Commits that are walked are included if they are not TREESAME |
| 1511 | to any parent. |
| 1512 | </p> |
| 1513 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1514 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1515 | --sparse |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1516 | </dt> |
| 1517 | <dd> |
| 1518 | <p> |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1519 | All commits that are walked are included. |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1520 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1521 | <div class="paragraph"><p>Note that without <em>--full-history</em>, this still simplifies merges: if |
Junio C Hamano | a76cb0d | 2008-08-13 20:04:10 | [diff] [blame] | 1522 | one of the parents is TREESAME, we follow only that one, so the other |
| 1523 | sides of the merge are never walked.</p></div> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1524 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1525 | <dt class="hdlist1"> |
Junio C Hamano | a2f4662 | 2008-09-03 05:20:31 | [diff] [blame] | 1526 | --simplify-merges |
| 1527 | </dt> |
| 1528 | <dd> |
| 1529 | <p> |
| 1530 | First, build a history graph in the same way that |
| 1531 | <em>--full-history</em> with parent rewriting does (see above). |
| 1532 | </p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1533 | <div class="paragraph"><p>Then simplify each commit <code>C</code> to its replacement <code>C'</code> in the final |
Junio C Hamano | a2f4662 | 2008-09-03 05:20:31 | [diff] [blame] | 1534 | history according to the following rules:</p></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1535 | <div class="openblock"> |
| 1536 | <div class="content"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1537 | <div class="ulist"><ul> |
Junio C Hamano | a2f4662 | 2008-09-03 05:20:31 | [diff] [blame] | 1538 | <li> |
| 1539 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1540 | Set <code>C'</code> to <code>C</code>. |
Junio C Hamano | a2f4662 | 2008-09-03 05:20:31 | [diff] [blame] | 1541 | </p> |
| 1542 | </li> |
| 1543 | <li> |
| 1544 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1545 | Replace each parent <code>P</code> of <code>C'</code> with its simplification <code>P'</code>. In |
Junio C Hamano | a2f4662 | 2008-09-03 05:20:31 | [diff] [blame] | 1546 | the process, drop parents that are ancestors of other parents, and |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1547 | remove duplicates. |
Junio C Hamano | a2f4662 | 2008-09-03 05:20:31 | [diff] [blame] | 1548 | </p> |
| 1549 | </li> |
| 1550 | <li> |
| 1551 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1552 | If after this parent rewriting, <code>C'</code> is a root or merge commit (has |
Junio C Hamano | a2f4662 | 2008-09-03 05:20:31 | [diff] [blame] | 1553 | zero or >1 parents), a boundary commit, or !TREESAME, it remains. |
| 1554 | Otherwise, it is replaced with its only parent. |
| 1555 | </p> |
| 1556 | </li> |
| 1557 | </ul></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1558 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1559 | <div class="paragraph"><p>The effect of this is best shown by way of comparing to |
Junio C Hamano | a2f4662 | 2008-09-03 05:20:31 | [diff] [blame] | 1560 | <em>--full-history</em> with parent rewriting. The example turns into:</p></div> |
| 1561 | <div class="listingblock"> |
| 1562 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1563 | <pre><code> .-A---M---N---O |
Junio C Hamano | a2f4662 | 2008-09-03 05:20:31 | [diff] [blame] | 1564 | / / / |
| 1565 | I B D |
| 1566 | \ / / |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1567 | `---------'</code></pre> |
Junio C Hamano | a2f4662 | 2008-09-03 05:20:31 | [diff] [blame] | 1568 | </div></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1569 | <div class="paragraph"><p>Note the major differences in <code>N</code> and <code>P</code> over <em>--full-history</em>:</p></div> |
| 1570 | <div class="openblock"> |
| 1571 | <div class="content"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1572 | <div class="ulist"><ul> |
Junio C Hamano | a2f4662 | 2008-09-03 05:20:31 | [diff] [blame] | 1573 | <li> |
| 1574 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1575 | <code>N</code>'s parent list had <code>I</code> removed, because it is an ancestor of the |
| 1576 | other parent <code>M</code>. Still, <code>N</code> remained because it is !TREESAME. |
Junio C Hamano | a2f4662 | 2008-09-03 05:20:31 | [diff] [blame] | 1577 | </p> |
| 1578 | </li> |
| 1579 | <li> |
| 1580 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1581 | <code>P</code>'s parent list similarly had <code>I</code> removed. <code>P</code> was then |
Junio C Hamano | a2f4662 | 2008-09-03 05:20:31 | [diff] [blame] | 1582 | removed completely, because it had one parent and is TREESAME. |
| 1583 | </p> |
| 1584 | </li> |
| 1585 | </ul></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1586 | </div></div> |
Junio C Hamano | a2f4662 | 2008-09-03 05:20:31 | [diff] [blame] | 1587 | </dd> |
| 1588 | </dl></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1589 | <div class="paragraph"><p>Finally, there is a fifth simplification mode available:</p></div> |
| 1590 | <div class="dlist"><dl> |
| 1591 | <dt class="hdlist1"> |
Junio C Hamano | 89a5734 | 2010-06-22 23:22:55 | [diff] [blame] | 1592 | --ancestry-path |
| 1593 | </dt> |
| 1594 | <dd> |
| 1595 | <p> |
| 1596 | Limit the displayed commits to those directly on the ancestry |
| 1597 | chain between the "from" and "to" commits in the given commit |
| 1598 | range. I.e. only display commits that are ancestor of the "to" |
| 1599 | commit, and descendants of the "from" commit. |
| 1600 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1601 | <div class="paragraph"><p>As an example use case, consider the following commit history:</p></div> |
Junio C Hamano | 89a5734 | 2010-06-22 23:22:55 | [diff] [blame] | 1602 | <div class="listingblock"> |
| 1603 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1604 | <pre><code> D---E-------F |
Junio C Hamano | 89a5734 | 2010-06-22 23:22:55 | [diff] [blame] | 1605 | / \ \ |
| 1606 | B---C---G---H---I---J |
| 1607 | / \ |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1608 | A-------K---------------L--M</code></pre> |
Junio C Hamano | 89a5734 | 2010-06-22 23:22:55 | [diff] [blame] | 1609 | </div></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1610 | <div class="paragraph"><p>A regular <em>D..M</em> computes the set of commits that are ancestors of <code>M</code>, |
| 1611 | but excludes the ones that are ancestors of <code>D</code>. This is useful to see |
| 1612 | what happened to the history leading to <code>M</code> since <code>D</code>, in the sense |
| 1613 | that "what does <code>M</code> have that did not exist in <code>D</code>". The result in this |
| 1614 | example would be all the commits, except <code>A</code> and <code>B</code> (and <code>D</code> itself, |
Junio C Hamano | 89a5734 | 2010-06-22 23:22:55 | [diff] [blame] | 1615 | of course).</p></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1616 | <div class="paragraph"><p>When we want to find out what commits in <code>M</code> are contaminated with the |
| 1617 | bug introduced by <code>D</code> and need fixing, however, we might want to view |
| 1618 | only the subset of <em>D..M</em> that are actually descendants of <code>D</code>, i.e. |
| 1619 | excluding <code>C</code> and <code>K</code>. This is exactly what the <em>--ancestry-path</em> |
Junio C Hamano | 89a5734 | 2010-06-22 23:22:55 | [diff] [blame] | 1620 | option does. Applied to the <em>D..M</em> range, it results in:</p></div> |
| 1621 | <div class="listingblock"> |
| 1622 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1623 | <pre><code> E-------F |
Junio C Hamano | 89a5734 | 2010-06-22 23:22:55 | [diff] [blame] | 1624 | \ \ |
| 1625 | G---H---I---J |
| 1626 | \ |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1627 | L--M</code></pre> |
Junio C Hamano | 89a5734 | 2010-06-22 23:22:55 | [diff] [blame] | 1628 | </div></div> |
| 1629 | </dd> |
| 1630 | </dl></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1631 | <div class="paragraph"><p>The <em>--simplify-by-decoration</em> option allows you to view only the |
Junio C Hamano | 2836349 | 2008-11-14 08:26:31 | [diff] [blame] | 1632 | big picture of the topology of the history, by omitting commits |
| 1633 | that are not referenced by tags. Commits are marked as !TREESAME |
| 1634 | (in other words, kept after history simplification rules described |
| 1635 | above) if (1) they are referenced by tags, or (2) they change the |
| 1636 | contents of the paths given on the command line. All other |
| 1637 | commits are marked as TREESAME (subject to be simplified away).</p></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1638 | </div> |
| 1639 | <div class="sect2"> |
| 1640 | <h3 id="_commit_ordering">Commit Ordering</h3> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1641 | <div class="paragraph"><p>By default, the commits are shown in reverse chronological order.</p></div> |
| 1642 | <div class="dlist"><dl> |
| 1643 | <dt class="hdlist1"> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1644 | --date-order |
| 1645 | </dt> |
| 1646 | <dd> |
| 1647 | <p> |
Junio C Hamano | d031611 | 2012-08-22 19:55:29 | [diff] [blame] | 1648 | Show no parents before all of its children are shown, but |
| 1649 | otherwise show commits in the commit timestamp order. |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1650 | </p> |
| 1651 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1652 | <dt class="hdlist1"> |
Junio C Hamano | d031611 | 2012-08-22 19:55:29 | [diff] [blame] | 1653 | --topo-order |
| 1654 | </dt> |
| 1655 | <dd> |
| 1656 | <p> |
| 1657 | Show no parents before all of its children are shown, and |
| 1658 | avoid showing commits on multiple lines of history |
| 1659 | intermixed. |
| 1660 | </p> |
| 1661 | <div class="paragraph"><p>For example, in a commit history like this:</p></div> |
| 1662 | <div class="listingblock"> |
| 1663 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1664 | <pre><code> ---1----2----4----7 |
Junio C Hamano | d031611 | 2012-08-22 19:55:29 | [diff] [blame] | 1665 | \ \ |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1666 | 3----5----6----8---</code></pre> |
Junio C Hamano | d031611 | 2012-08-22 19:55:29 | [diff] [blame] | 1667 | </div></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1668 | <div class="paragraph"><p>where the numbers denote the order of commit timestamps, <code>git |
| 1669 | rev-list</code> and friends with <code>--date-order</code> show the commits in the |
Junio C Hamano | d031611 | 2012-08-22 19:55:29 | [diff] [blame] | 1670 | timestamp order: 8 7 6 5 4 3 2 1.</p></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1671 | <div class="paragraph"><p>With <code>--topo-order</code>, they would show 8 6 5 3 7 4 2 1 (or 8 7 4 2 6 5 |
Junio C Hamano | d031611 | 2012-08-22 19:55:29 | [diff] [blame] | 1672 | 3 1); some older commits are shown before newer ones in order to |
| 1673 | avoid showing the commits from two parallel development track mixed |
| 1674 | together.</p></div> |
| 1675 | </dd> |
| 1676 | <dt class="hdlist1"> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1677 | --reverse |
| 1678 | </dt> |
| 1679 | <dd> |
| 1680 | <p> |
| 1681 | Output the commits in reverse order. |
| 1682 | Cannot be combined with <em>--walk-reflogs</em>. |
| 1683 | </p> |
| 1684 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1685 | </dl></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1686 | </div> |
| 1687 | <div class="sect2"> |
| 1688 | <h3 id="_object_traversal">Object Traversal</h3> |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 1689 | <div class="paragraph"><p>These options are mostly targeted for packing of Git repositories.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1690 | <div class="dlist"><dl> |
| 1691 | <dt class="hdlist1"> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1692 | --objects |
| 1693 | </dt> |
| 1694 | <dd> |
| 1695 | <p> |
| 1696 | Print the object IDs of any object referenced by the listed |
| 1697 | commits. <em>--objects foo ^bar</em> thus means "send me |
| 1698 | all object IDs which I need to download if I have the commit |
| 1699 | object <em>bar</em>, but not <em>foo</em>". |
| 1700 | </p> |
| 1701 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1702 | <dt class="hdlist1"> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1703 | --objects-edge |
| 1704 | </dt> |
| 1705 | <dd> |
| 1706 | <p> |
| 1707 | Similar to <em>--objects</em>, but also print the IDs of excluded |
| 1708 | commits prefixed with a "-" character. This is used by |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1709 | <a href="git-pack-objects.html">git-pack-objects(1)</a> to build "thin" pack, which records |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1710 | objects in deltified form based on objects contained in these |
| 1711 | excluded commits to reduce network traffic. |
| 1712 | </p> |
| 1713 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1714 | <dt class="hdlist1"> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1715 | --unpacked |
| 1716 | </dt> |
| 1717 | <dd> |
| 1718 | <p> |
| 1719 | Only useful with <em>--objects</em>; print the object IDs that are not |
| 1720 | in packs. |
| 1721 | </p> |
| 1722 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1723 | <dt class="hdlist1"> |
Junio C Hamano | eccdd4a | 2012-09-10 23:28:17 | [diff] [blame] | 1724 | --no-walk[=(sorted|unsorted)] |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1725 | </dt> |
| 1726 | <dd> |
| 1727 | <p> |
Junio C Hamano | eccdd4a | 2012-09-10 23:28:17 | [diff] [blame] | 1728 | Only show the given commits, but do not traverse their ancestors. |
| 1729 | This has no effect if a range is specified. If the argument |
| 1730 | "unsorted" is given, the commits are show in the order they were |
| 1731 | given on the command line. Otherwise (if "sorted" or no argument |
| 1732 | was given), the commits are show in reverse chronological order |
| 1733 | by commit time. |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1734 | </p> |
| 1735 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1736 | <dt class="hdlist1"> |
Junio C Hamano | b0e0295 | 2008-01-19 08:02:00 | [diff] [blame] | 1737 | --do-walk |
| 1738 | </dt> |
| 1739 | <dd> |
| 1740 | <p> |
| 1741 | Overrides a previous --no-walk. |
| 1742 | </p> |
| 1743 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1744 | </dl></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1745 | </div> |
| 1746 | <div class="sect2"> |
| 1747 | <h3 id="_commit_formatting">Commit Formatting</h3> |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 1748 | <div class="dlist"><dl> |
| 1749 | <dt class="hdlist1"> |
| 1750 | --pretty[=<format>] |
| 1751 | </dt> |
| 1752 | <dt class="hdlist1"> |
| 1753 | --format=<format> |
| 1754 | </dt> |
| 1755 | <dd> |
| 1756 | <p> |
| 1757 | Pretty-print the contents of the commit logs in a given format, |
| 1758 | where <em><format></em> can be one of <em>oneline</em>, <em>short</em>, <em>medium</em>, |
| 1759 | <em>full</em>, <em>fuller</em>, <em>email</em>, <em>raw</em> and <em>format:<string></em>. See |
| 1760 | the "PRETTY FORMATS" section for some additional details for each |
| 1761 | format. When omitted, the format defaults to <em>medium</em>. |
| 1762 | </p> |
| 1763 | <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] | 1764 | configuration (see <a href="git-config.html">git-config(1)</a>).</p></div> |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 1765 | </dd> |
| 1766 | <dt class="hdlist1"> |
| 1767 | --abbrev-commit |
| 1768 | </dt> |
| 1769 | <dd> |
| 1770 | <p> |
| 1771 | Instead of showing the full 40-byte hexadecimal commit object |
| 1772 | name, show only a partial prefix. Non default number of |
| 1773 | digits can be specified with "--abbrev=<n>" (which also modifies |
| 1774 | diff output, if it is displayed). |
| 1775 | </p> |
| 1776 | <div class="paragraph"><p>This should make "--pretty=oneline" a whole lot more readable for |
| 1777 | people using 80-column terminals.</p></div> |
| 1778 | </dd> |
| 1779 | <dt class="hdlist1"> |
Junio C Hamano | f93530e | 2011-05-25 23:59:59 | [diff] [blame] | 1780 | --no-abbrev-commit |
| 1781 | </dt> |
| 1782 | <dd> |
| 1783 | <p> |
| 1784 | Show the full 40-byte hexadecimal commit object name. This negates |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1785 | <code>--abbrev-commit</code> and those options which imply it such as |
Junio C Hamano | f93530e | 2011-05-25 23:59:59 | [diff] [blame] | 1786 | "--oneline". It also overrides the <em>log.abbrevCommit</em> variable. |
| 1787 | </p> |
| 1788 | </dd> |
| 1789 | <dt class="hdlist1"> |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 1790 | --oneline |
| 1791 | </dt> |
| 1792 | <dd> |
| 1793 | <p> |
| 1794 | This is a shorthand for "--pretty=oneline --abbrev-commit" |
| 1795 | used together. |
| 1796 | </p> |
| 1797 | </dd> |
| 1798 | <dt class="hdlist1"> |
| 1799 | --encoding[=<encoding>] |
| 1800 | </dt> |
| 1801 | <dd> |
| 1802 | <p> |
| 1803 | The commit objects record the encoding used for the log message |
| 1804 | in their encoding header; this option can be used to tell the |
| 1805 | command to re-code the commit log message in the encoding |
| 1806 | preferred by the user. For non plumbing commands this |
| 1807 | defaults to UTF-8. |
| 1808 | </p> |
| 1809 | </dd> |
| 1810 | <dt class="hdlist1"> |
Junio C Hamano | 6003346 | 2011-05-03 00:48:43 | [diff] [blame] | 1811 | --notes[=<ref>] |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 1812 | </dt> |
| 1813 | <dd> |
| 1814 | <p> |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1815 | Show the notes (see <a href="git-notes.html">git-notes(1)</a>) that annotate the |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 1816 | commit, when showing the commit log message. This is the default |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1817 | for <code>git log</code>, <code>git show</code> and <code>git whatchanged</code> commands when |
| 1818 | 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] | 1819 | on the command line. |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 1820 | </p> |
Junio C Hamano | 6003346 | 2011-05-03 00:48:43 | [diff] [blame] | 1821 | <div class="paragraph"><p>By default, the notes shown are from the notes refs listed in the |
| 1822 | <em>core.notesRef</em> and <em>notes.displayRef</em> variables (or corresponding |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1823 | 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] | 1824 | <div class="paragraph"><p>With an optional <em><ref></em> argument, show this notes ref instead of the |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1825 | 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] | 1826 | is not qualified.</p></div> |
| 1827 | <div class="paragraph"><p>Multiple --notes options can be combined to control which notes are |
| 1828 | being displayed. Examples: "--notes=foo" will show only notes from |
| 1829 | "refs/notes/foo"; "--notes=foo --notes" will show both notes from |
| 1830 | "refs/notes/foo" and from the default notes ref(s).</p></div> |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 1831 | </dd> |
| 1832 | <dt class="hdlist1"> |
Junio C Hamano | 6003346 | 2011-05-03 00:48:43 | [diff] [blame] | 1833 | --no-notes |
| 1834 | </dt> |
| 1835 | <dd> |
| 1836 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1837 | 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] | 1838 | resetting the list of notes refs from which notes are shown. |
| 1839 | Options are parsed in the order given on the command line, so e.g. |
| 1840 | "--notes --notes=foo --no-notes --notes=bar" will only show notes |
| 1841 | from "refs/notes/bar". |
| 1842 | </p> |
| 1843 | </dd> |
| 1844 | <dt class="hdlist1"> |
| 1845 | --show-notes[=<ref>] |
| 1846 | </dt> |
| 1847 | <dt class="hdlist1"> |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 1848 | --[no-]standard-notes |
| 1849 | </dt> |
| 1850 | <dd> |
| 1851 | <p> |
Junio C Hamano | 6003346 | 2011-05-03 00:48:43 | [diff] [blame] | 1852 | These options are deprecated. Use the above --notes/--no-notes |
| 1853 | options instead. |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 1854 | </p> |
| 1855 | </dd> |
| 1856 | <dt class="hdlist1"> |
Junio C Hamano | 0acb1ae | 2012-09-24 21:28:13 | [diff] [blame] | 1857 | --show-signature |
| 1858 | </dt> |
| 1859 | <dd> |
| 1860 | <p> |
| 1861 | Check the validity of a signed commit object by passing the signature |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1862 | to <code>gpg --verify</code> and show the output. |
Junio C Hamano | 0acb1ae | 2012-09-24 21:28:13 | [diff] [blame] | 1863 | </p> |
| 1864 | </dd> |
| 1865 | <dt class="hdlist1"> |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 1866 | --relative-date |
| 1867 | </dt> |
| 1868 | <dd> |
| 1869 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1870 | Synonym for <code>--date=relative</code>. |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 1871 | </p> |
| 1872 | </dd> |
| 1873 | <dt class="hdlist1"> |
| 1874 | --date=(relative|local|default|iso|rfc|short|raw) |
| 1875 | </dt> |
| 1876 | <dd> |
| 1877 | <p> |
| 1878 | Only takes effect for dates shown in human-readable format, such |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1879 | as when using "--pretty". <code>log.date</code> config variable sets a default |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 1880 | value for log command’s --date option. |
| 1881 | </p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1882 | <div class="paragraph"><p><code>--date=relative</code> shows dates relative to the current time, |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 1883 | e.g. "2 hours ago".</p></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1884 | <div class="paragraph"><p><code>--date=local</code> shows timestamps in user’s local timezone.</p></div> |
| 1885 | <div class="paragraph"><p><code>--date=iso</code> (or <code>--date=iso8601</code>) shows timestamps in ISO 8601 format.</p></div> |
| 1886 | <div class="paragraph"><p><code>--date=rfc</code> (or <code>--date=rfc2822</code>) shows timestamps in RFC 2822 |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 1887 | format, often found in E-mail messages.</p></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1888 | <div class="paragraph"><p><code>--date=short</code> shows only date but not time, in <code>YYYY-MM-DD</code> format.</p></div> |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 1889 | <div class="paragraph"><p><code>--date=raw</code> shows the date in the internal raw Git format <code>%s %z</code> format.</p></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1890 | <div class="paragraph"><p><code>--date=default</code> shows timestamps in the original timezone |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 1891 | (either committer’s or author’s).</p></div> |
| 1892 | </dd> |
| 1893 | <dt class="hdlist1"> |
| 1894 | --parents |
| 1895 | </dt> |
| 1896 | <dd> |
| 1897 | <p> |
| 1898 | Print also the parents of the commit (in the form "commit parent…"). |
| 1899 | Also enables parent rewriting, see <em>History Simplification</em> below. |
| 1900 | </p> |
| 1901 | </dd> |
| 1902 | <dt class="hdlist1"> |
| 1903 | --children |
| 1904 | </dt> |
| 1905 | <dd> |
| 1906 | <p> |
| 1907 | Print also the children of the commit (in the form "commit child…"). |
| 1908 | Also enables parent rewriting, see <em>History Simplification</em> below. |
| 1909 | </p> |
| 1910 | </dd> |
| 1911 | <dt class="hdlist1"> |
| 1912 | --left-right |
| 1913 | </dt> |
| 1914 | <dd> |
| 1915 | <p> |
| 1916 | Mark which side of a symmetric diff a commit is reachable from. |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1917 | Commits from the left side are prefixed with <code><</code> and those from |
| 1918 | the right with <code>></code>. If combined with <code>--boundary</code>, those |
| 1919 | commits are prefixed with <code>-</code>. |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 1920 | </p> |
| 1921 | <div class="paragraph"><p>For example, if you have this topology:</p></div> |
| 1922 | <div class="listingblock"> |
| 1923 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1924 | <pre><code> y---b---b branch B |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 1925 | / \ / |
| 1926 | / . |
| 1927 | / / \ |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1928 | o---x---a---a branch A</code></pre> |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 1929 | </div></div> |
| 1930 | <div class="paragraph"><p>you would get an output like this:</p></div> |
| 1931 | <div class="listingblock"> |
| 1932 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1933 | <pre><code> $ git rev-list --left-right --boundary --pretty=oneline A...B |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 1934 | |
| 1935 | >bbbbbbb... 3rd on b |
| 1936 | >bbbbbbb... 2nd on b |
| 1937 | <aaaaaaa... 3rd on a |
| 1938 | <aaaaaaa... 2nd on a |
| 1939 | -yyyyyyy... 1st on b |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1940 | -xxxxxxx... 1st on a</code></pre> |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 1941 | </div></div> |
| 1942 | </dd> |
| 1943 | <dt class="hdlist1"> |
| 1944 | --graph |
| 1945 | </dt> |
| 1946 | <dd> |
| 1947 | <p> |
| 1948 | Draw a text-based graphical representation of the commit history |
| 1949 | on the left hand side of the output. This may cause extra lines |
| 1950 | to be printed in between commits, in order for the graph history |
| 1951 | to be drawn properly. |
| 1952 | </p> |
| 1953 | <div class="paragraph"><p>This enables parent rewriting, see <em>History Simplification</em> below.</p></div> |
| 1954 | <div class="paragraph"><p>This implies the <em>--topo-order</em> option by default, but the |
| 1955 | <em>--date-order</em> option may also be specified.</p></div> |
| 1956 | </dd> |
| 1957 | </dl></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 1958 | </div> |
| 1959 | <div class="sect2"> |
| 1960 | <h3 id="_diff_formatting">Diff Formatting</h3> |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 1961 | <div class="paragraph"><p>Below are listed options that control the formatting of diff output. |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1962 | Some of them are specific to <a href="git-rev-list.html">git-rev-list(1)</a>, however other diff |
| 1963 | options may be given. See <a href="git-diff-files.html">git-diff-files(1)</a> for more options.</p></div> |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 1964 | <div class="dlist"><dl> |
| 1965 | <dt class="hdlist1"> |
| 1966 | -c |
| 1967 | </dt> |
| 1968 | <dd> |
| 1969 | <p> |
| 1970 | With this option, diff output for a merge commit |
| 1971 | shows the differences from each of the parents to the merge result |
| 1972 | simultaneously instead of showing pairwise diff between a parent |
| 1973 | and the result one at a time. Furthermore, it lists only files |
| 1974 | which were modified from all parents. |
| 1975 | </p> |
| 1976 | </dd> |
| 1977 | <dt class="hdlist1"> |
| 1978 | --cc |
| 1979 | </dt> |
| 1980 | <dd> |
| 1981 | <p> |
Junio C Hamano | 44dcd49 | 2012-07-24 04:35:38 | [diff] [blame] | 1982 | This flag implies the <em>-c</em> option and further compresses the |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 1983 | patch output by omitting uninteresting hunks whose contents in |
| 1984 | the parents have only two variants and the merge result picks |
| 1985 | one of them without modification. |
| 1986 | </p> |
| 1987 | </dd> |
| 1988 | <dt class="hdlist1"> |
| 1989 | -m |
| 1990 | </dt> |
| 1991 | <dd> |
| 1992 | <p> |
| 1993 | This flag makes the merge commits show the full diff like |
| 1994 | regular commits; for each merge parent, a separate log entry |
| 1995 | and diff is generated. An exception is that only diff against |
| 1996 | the first parent is shown when <em>--first-parent</em> option is given; |
| 1997 | in that case, the output represents the changes the merge |
| 1998 | brought <em>into</em> the then-current branch. |
| 1999 | </p> |
| 2000 | </dd> |
| 2001 | <dt class="hdlist1"> |
| 2002 | -r |
| 2003 | </dt> |
| 2004 | <dd> |
| 2005 | <p> |
| 2006 | Show recursive diffs. |
| 2007 | </p> |
| 2008 | </dd> |
| 2009 | <dt class="hdlist1"> |
| 2010 | -t |
| 2011 | </dt> |
| 2012 | <dd> |
| 2013 | <p> |
| 2014 | Show the tree objects in the diff output. This implies <em>-r</em>. |
| 2015 | </p> |
| 2016 | </dd> |
| 2017 | <dt class="hdlist1"> |
| 2018 | -s |
| 2019 | </dt> |
| 2020 | <dd> |
| 2021 | <p> |
| 2022 | Suppress diff output. |
| 2023 | </p> |
| 2024 | </dd> |
| 2025 | </dl></div> |
Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 2026 | </div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2027 | </div> |
| 2028 | </div> |
| 2029 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2030 | <h2 id="_pretty_formats">PRETTY FORMATS</h2> |
Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 2031 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2032 | <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] | 2033 | is not <em>oneline</em>, <em>email</em> or <em>raw</em>, an additional line is |
| 2034 | inserted before the <em>Author:</em> line. This line begins with |
| 2035 | "Merge: " and the sha1s of ancestral commits are printed, |
| 2036 | separated by spaces. Note that the listed commits may not |
| 2037 | necessarily be the list of the <strong>direct</strong> parent commits if you |
| 2038 | have limited your view of history: for example, if you are |
| 2039 | only interested in changes related to a certain directory or |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2040 | file.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2041 | <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] | 2042 | additional formats by setting a pretty.<name> |
| 2043 | config option to either another format name, or a |
| 2044 | <em>format:</em> string, as described below (see |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 2045 | <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] | 2046 | built-in formats:</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2047 | <div class="ulist"><ul> |
Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 2048 | <li> |
| 2049 | <p> |
| 2050 | <em>oneline</em> |
| 2051 | </p> |
| 2052 | <div class="literalblock"> |
| 2053 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2054 | <pre><code><sha1> <title line></code></pre> |
Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 2055 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2056 | <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] | 2057 | </li> |
| 2058 | <li> |
| 2059 | <p> |
| 2060 | <em>short</em> |
| 2061 | </p> |
| 2062 | <div class="literalblock"> |
| 2063 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2064 | <pre><code>commit <sha1> |
| 2065 | Author: <author></code></pre> |
Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 2066 | </div></div> |
| 2067 | <div class="literalblock"> |
| 2068 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2069 | <pre><code><title line></code></pre> |
Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 2070 | </div></div> |
| 2071 | </li> |
| 2072 | <li> |
| 2073 | <p> |
| 2074 | <em>medium</em> |
| 2075 | </p> |
| 2076 | <div class="literalblock"> |
| 2077 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2078 | <pre><code>commit <sha1> |
Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 2079 | Author: <author> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2080 | Date: <author date></code></pre> |
Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 2081 | </div></div> |
| 2082 | <div class="literalblock"> |
| 2083 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2084 | <pre><code><title line></code></pre> |
Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 2085 | </div></div> |
| 2086 | <div class="literalblock"> |
| 2087 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2088 | <pre><code><full commit message></code></pre> |
Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 2089 | </div></div> |
| 2090 | </li> |
| 2091 | <li> |
| 2092 | <p> |
| 2093 | <em>full</em> |
| 2094 | </p> |
| 2095 | <div class="literalblock"> |
| 2096 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2097 | <pre><code>commit <sha1> |
Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 2098 | Author: <author> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2099 | Commit: <committer></code></pre> |
Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 2100 | </div></div> |
| 2101 | <div class="literalblock"> |
| 2102 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2103 | <pre><code><title line></code></pre> |
Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 2104 | </div></div> |
| 2105 | <div class="literalblock"> |
| 2106 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2107 | <pre><code><full commit message></code></pre> |
Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 2108 | </div></div> |
| 2109 | </li> |
| 2110 | <li> |
| 2111 | <p> |
| 2112 | <em>fuller</em> |
| 2113 | </p> |
| 2114 | <div class="literalblock"> |
| 2115 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2116 | <pre><code>commit <sha1> |
Junio C Hamano | 6a3c827 | 2008-12-19 21:38:18 | [diff] [blame] | 2117 | Author: <author> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2118 | AuthorDate: <author date> |
Junio C Hamano | 6a3c827 | 2008-12-19 21:38:18 | [diff] [blame] | 2119 | Commit: <committer> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2120 | CommitDate: <committer date></code></pre> |
Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 2121 | </div></div> |
| 2122 | <div class="literalblock"> |
| 2123 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2124 | <pre><code><title line></code></pre> |
Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 2125 | </div></div> |
| 2126 | <div class="literalblock"> |
| 2127 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2128 | <pre><code><full commit message></code></pre> |
Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 2129 | </div></div> |
| 2130 | </li> |
| 2131 | <li> |
| 2132 | <p> |
| 2133 | <em>email</em> |
| 2134 | </p> |
| 2135 | <div class="literalblock"> |
| 2136 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2137 | <pre><code>From <sha1> <date> |
Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 2138 | From: <author> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2139 | Date: <author date> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2140 | Subject: [PATCH] <title line></code></pre> |
Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 2141 | </div></div> |
| 2142 | <div class="literalblock"> |
| 2143 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2144 | <pre><code><full commit message></code></pre> |
Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 2145 | </div></div> |
| 2146 | </li> |
| 2147 | <li> |
| 2148 | <p> |
| 2149 | <em>raw</em> |
| 2150 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2151 | <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] | 2152 | stored in the commit object. Notably, the SHA1s are |
| 2153 | displayed in full, regardless of whether --abbrev or |
| 2154 | --no-abbrev are used, and <em>parents</em> information show the |
| 2155 | true parent commits, without taking grafts nor history |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2156 | simplification into account.</p></div> |
Junio C Hamano | a340aaa | 2006-11-23 02:47:33 | [diff] [blame] | 2157 | </li> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 2158 | <li> |
| 2159 | <p> |
Junio C Hamano | e32ec8b | 2010-06-02 23:32:31 | [diff] [blame] | 2160 | <em>format:<string></em> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 2161 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2162 | <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] | 2163 | you want to show. It works a little bit like printf format, |
| 2164 | 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] | 2165 | instead of <em>\n</em>.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2166 | <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] | 2167 | would show something like this:</p></div> |
Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 2168 | <div class="listingblock"> |
| 2169 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2170 | <pre><code>The author of fe6e0ee was Junio C Hamano, 23 hours ago |
| 2171 | 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] | 2172 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2173 | <div class="paragraph"><p>The placeholders are:</p></div> |
| 2174 | <div class="ulist"><ul> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 2175 | <li> |
| 2176 | <p> |
| 2177 | <em>%H</em>: commit hash |
| 2178 | </p> |
| 2179 | </li> |
| 2180 | <li> |
| 2181 | <p> |
| 2182 | <em>%h</em>: abbreviated commit hash |
| 2183 | </p> |
| 2184 | </li> |
| 2185 | <li> |
| 2186 | <p> |
| 2187 | <em>%T</em>: tree hash |
| 2188 | </p> |
| 2189 | </li> |
| 2190 | <li> |
| 2191 | <p> |
| 2192 | <em>%t</em>: abbreviated tree hash |
| 2193 | </p> |
| 2194 | </li> |
| 2195 | <li> |
| 2196 | <p> |
| 2197 | <em>%P</em>: parent hashes |
| 2198 | </p> |
| 2199 | </li> |
| 2200 | <li> |
| 2201 | <p> |
| 2202 | <em>%p</em>: abbreviated parent hashes |
| 2203 | </p> |
| 2204 | </li> |
| 2205 | <li> |
| 2206 | <p> |
| 2207 | <em>%an</em>: author name |
| 2208 | </p> |
| 2209 | </li> |
| 2210 | <li> |
| 2211 | <p> |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 2212 | <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] | 2213 | </p> |
| 2214 | </li> |
| 2215 | <li> |
| 2216 | <p> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 2217 | <em>%ae</em>: author email |
| 2218 | </p> |
| 2219 | </li> |
| 2220 | <li> |
| 2221 | <p> |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 2222 | <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] | 2223 | </p> |
| 2224 | </li> |
| 2225 | <li> |
| 2226 | <p> |
Junio C Hamano | a387df3 | 2008-08-29 08:56:58 | [diff] [blame] | 2227 | <em>%ad</em>: author date (format respects --date= option) |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 2228 | </p> |
| 2229 | </li> |
| 2230 | <li> |
| 2231 | <p> |
| 2232 | <em>%aD</em>: author date, RFC2822 style |
| 2233 | </p> |
| 2234 | </li> |
| 2235 | <li> |
| 2236 | <p> |
| 2237 | <em>%ar</em>: author date, relative |
| 2238 | </p> |
| 2239 | </li> |
| 2240 | <li> |
| 2241 | <p> |
| 2242 | <em>%at</em>: author date, UNIX timestamp |
| 2243 | </p> |
| 2244 | </li> |
| 2245 | <li> |
| 2246 | <p> |
Junio C Hamano | 02f130b | 2007-07-14 08:26:56 | [diff] [blame] | 2247 | <em>%ai</em>: author date, ISO 8601 format |
| 2248 | </p> |
| 2249 | </li> |
| 2250 | <li> |
| 2251 | <p> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 2252 | <em>%cn</em>: committer name |
| 2253 | </p> |
| 2254 | </li> |
| 2255 | <li> |
| 2256 | <p> |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 2257 | <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] | 2258 | </p> |
| 2259 | </li> |
| 2260 | <li> |
| 2261 | <p> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 2262 | <em>%ce</em>: committer email |
| 2263 | </p> |
| 2264 | </li> |
| 2265 | <li> |
| 2266 | <p> |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 2267 | <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] | 2268 | </p> |
| 2269 | </li> |
| 2270 | <li> |
| 2271 | <p> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 2272 | <em>%cd</em>: committer date |
| 2273 | </p> |
| 2274 | </li> |
| 2275 | <li> |
| 2276 | <p> |
| 2277 | <em>%cD</em>: committer date, RFC2822 style |
| 2278 | </p> |
| 2279 | </li> |
| 2280 | <li> |
| 2281 | <p> |
| 2282 | <em>%cr</em>: committer date, relative |
| 2283 | </p> |
| 2284 | </li> |
| 2285 | <li> |
| 2286 | <p> |
| 2287 | <em>%ct</em>: committer date, UNIX timestamp |
| 2288 | </p> |
| 2289 | </li> |
| 2290 | <li> |
| 2291 | <p> |
Junio C Hamano | 02f130b | 2007-07-14 08:26:56 | [diff] [blame] | 2292 | <em>%ci</em>: committer date, ISO 8601 format |
| 2293 | </p> |
| 2294 | </li> |
| 2295 | <li> |
| 2296 | <p> |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 2297 | <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] | 2298 | </p> |
| 2299 | </li> |
| 2300 | <li> |
| 2301 | <p> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 2302 | <em>%e</em>: encoding |
| 2303 | </p> |
| 2304 | </li> |
| 2305 | <li> |
| 2306 | <p> |
| 2307 | <em>%s</em>: subject |
| 2308 | </p> |
| 2309 | </li> |
| 2310 | <li> |
| 2311 | <p> |
Junio C Hamano | 5f9a6f0 | 2009-04-06 08:26:56 | [diff] [blame] | 2312 | <em>%f</em>: sanitized subject line, suitable for a filename |
| 2313 | </p> |
| 2314 | </li> |
| 2315 | <li> |
| 2316 | <p> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 2317 | <em>%b</em>: body |
| 2318 | </p> |
| 2319 | </li> |
| 2320 | <li> |
| 2321 | <p> |
Junio C Hamano | cb39aea | 2010-05-09 07:24:48 | [diff] [blame] | 2322 | <em>%B</em>: raw body (unwrapped subject and body) |
| 2323 | </p> |
| 2324 | </li> |
| 2325 | <li> |
| 2326 | <p> |
Junio C Hamano | 3b70d3c | 2009-11-21 17:37:37 | [diff] [blame] | 2327 | <em>%N</em>: commit notes |
| 2328 | </p> |
| 2329 | </li> |
| 2330 | <li> |
| 2331 | <p> |
Junio C Hamano | 0acb1ae | 2012-09-24 21:28:13 | [diff] [blame] | 2332 | <em>%GG</em>: raw verification message from GPG for a signed commit |
| 2333 | </p> |
| 2334 | </li> |
| 2335 | <li> |
| 2336 | <p> |
Junio C Hamano | edf80bd | 2013-04-05 22:14:36 | [diff] [blame] | 2337 | <em>%G?</em>: show "G" for a Good signature, "B" for a Bad signature, "U" for a good, |
| 2338 | untrusted signature and "N" for no signature |
Junio C Hamano | 0acb1ae | 2012-09-24 21:28:13 | [diff] [blame] | 2339 | </p> |
| 2340 | </li> |
| 2341 | <li> |
| 2342 | <p> |
| 2343 | <em>%GS</em>: show the name of the signer for a signed commit |
| 2344 | </p> |
| 2345 | </li> |
| 2346 | <li> |
| 2347 | <p> |
Junio C Hamano | 5e7f131 | 2013-03-21 22:49:01 | [diff] [blame] | 2348 | <em>%GK</em>: show the key used to sign a signed commit |
| 2349 | </p> |
| 2350 | </li> |
| 2351 | <li> |
| 2352 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2353 | <em>%gD</em>: reflog selector, e.g., <code>refs/stash@{1}</code> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 2354 | </p> |
| 2355 | </li> |
| 2356 | <li> |
| 2357 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2358 | <em>%gd</em>: shortened reflog selector, e.g., <code>stash@{1}</code> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 2359 | </p> |
| 2360 | </li> |
| 2361 | <li> |
| 2362 | <p> |
Junio C Hamano | 962f3a3 | 2011-12-22 20:21:44 | [diff] [blame] | 2363 | <em>%gn</em>: reflog identity name |
| 2364 | </p> |
| 2365 | </li> |
| 2366 | <li> |
| 2367 | <p> |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 2368 | <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] | 2369 | </p> |
| 2370 | </li> |
| 2371 | <li> |
| 2372 | <p> |
| 2373 | <em>%ge</em>: reflog identity email |
| 2374 | </p> |
| 2375 | </li> |
| 2376 | <li> |
| 2377 | <p> |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 2378 | <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] | 2379 | </p> |
| 2380 | </li> |
| 2381 | <li> |
| 2382 | <p> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 2383 | <em>%gs</em>: reflog subject |
| 2384 | </p> |
| 2385 | </li> |
| 2386 | <li> |
| 2387 | <p> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 2388 | <em>%Cred</em>: switch color to red |
| 2389 | </p> |
| 2390 | </li> |
| 2391 | <li> |
| 2392 | <p> |
| 2393 | <em>%Cgreen</em>: switch color to green |
| 2394 | </p> |
| 2395 | </li> |
| 2396 | <li> |
| 2397 | <p> |
| 2398 | <em>%Cblue</em>: switch color to blue |
| 2399 | </p> |
| 2400 | </li> |
| 2401 | <li> |
| 2402 | <p> |
| 2403 | <em>%Creset</em>: reset color |
| 2404 | </p> |
| 2405 | </li> |
| 2406 | <li> |
| 2407 | <p> |
Junio C Hamano | abad6da | 2013-01-06 09:06:32 | [diff] [blame] | 2408 | <em>%C(…)</em>: color specification, as described in color.branch.* config option; |
| 2409 | adding <code>auto,</code> at the beginning will emit color only when colors are |
| 2410 | enabled for log output (by <code>color.diff</code>, <code>color.ui</code>, or <code>--color</code>, and |
| 2411 | respecting the <code>auto</code> settings of the former if we are going to a |
| 2412 | terminal) |
Junio C Hamano | cc0cb31 | 2009-01-22 03:38:50 | [diff] [blame] | 2413 | </p> |
| 2414 | </li> |
| 2415 | <li> |
| 2416 | <p> |
Junio C Hamano | d9e0e5d | 2007-04-14 16:22:04 | [diff] [blame] | 2417 | <em>%m</em>: left, right or boundary mark |
| 2418 | </p> |
| 2419 | </li> |
| 2420 | <li> |
| 2421 | <p> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 2422 | <em>%n</em>: newline |
| 2423 | </p> |
Junio C Hamano | 0430e3a | 2007-05-15 03:13:17 | [diff] [blame] | 2424 | </li> |
Junio C Hamano | b78d259 | 2008-04-09 09:39:08 | [diff] [blame] | 2425 | <li> |
| 2426 | <p> |
Junio C Hamano | a9701f0 | 2010-01-21 00:42:16 | [diff] [blame] | 2427 | <em>%%</em>: a raw <em>%</em> |
| 2428 | </p> |
| 2429 | </li> |
| 2430 | <li> |
| 2431 | <p> |
Junio C Hamano | b78d259 | 2008-04-09 09:39:08 | [diff] [blame] | 2432 | <em>%x00</em>: print a byte from a hex code |
| 2433 | </p> |
| 2434 | </li> |
Junio C Hamano | bf984de | 2009-11-23 06:11:19 | [diff] [blame] | 2435 | <li> |
| 2436 | <p> |
| 2437 | <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] | 2438 | <a href="git-shortlog.html">git-shortlog(1)</a>. |
Junio C Hamano | bf984de | 2009-11-23 06:11:19 | [diff] [blame] | 2439 | </p> |
| 2440 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2441 | </ul></div> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 2442 | </li> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 2443 | </ul></div> |
| 2444 | <div class="admonitionblock"> |
| 2445 | <table><tr> |
| 2446 | <td class="icon"> |
| 2447 | <div class="title">Note</div> |
| 2448 | </td> |
| 2449 | <td class="content">Some placeholders may depend on other options given to the |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2450 | revision traversal engine. For example, the <code>%g*</code> reflog options will |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 2451 | insert an empty string unless we are traversing reflog entries (e.g., by |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2452 | <code>git log -g</code>). The <code>%d</code> placeholder will use the "short" decoration |
| 2453 | 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] | 2454 | </tr></table> |
| 2455 | </div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2456 | <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] | 2457 | is inserted immediately before the expansion if and only if the |
| 2458 | placeholder expands to a non-empty string.</p></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2459 | <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] | 2460 | immediately precede the expansion are deleted if and only if the |
| 2461 | placeholder expands to an empty string.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2462 | <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] | 2463 | is inserted immediately before the expansion if and only if the |
| 2464 | placeholder expands to a non-empty string.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2465 | <div class="ulist"><ul> |
Junio C Hamano | 6fb124c | 2008-06-13 10:04:01 | [diff] [blame] | 2466 | <li> |
| 2467 | <p> |
| 2468 | <em>tformat:</em> |
| 2469 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2470 | <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] | 2471 | provides "terminator" semantics instead of "separator" semantics. In |
| 2472 | other words, each commit has the message terminator character (usually a |
| 2473 | newline) appended, rather than a separator placed between entries. |
| 2474 | This means that the final entry of a single-line format will be properly |
| 2475 | terminated with a new line, just as the "oneline" format does. |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2476 | For example:</p></div> |
Junio C Hamano | 6fb124c | 2008-06-13 10:04:01 | [diff] [blame] | 2477 | <div class="listingblock"> |
| 2478 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2479 | <pre><code>$ git log -2 --pretty=format:%h 4da45bef \ |
Junio C Hamano | 6fb124c | 2008-06-13 10:04:01 | [diff] [blame] | 2480 | | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/' |
| 2481 | 4da45be |
| 2482 | 7134973 -- NO NEWLINE |
| 2483 | |
| 2484 | $ git log -2 --pretty=tformat:%h 4da45bef \ |
| 2485 | | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/' |
| 2486 | 4da45be |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2487 | 7134973</code></pre> |
Junio C Hamano | 6fb124c | 2008-06-13 10:04:01 | [diff] [blame] | 2488 | </div></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2489 | <div class="paragraph"><p>In addition, any unrecognized string that has a <code>%</code> in it is interpreted |
| 2490 | 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] | 2491 | equivalent:</p></div> |
| 2492 | <div class="listingblock"> |
| 2493 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2494 | <pre><code>$ git log -2 --pretty=tformat:%h 4da45bef |
| 2495 | $ git log -2 --pretty=%h 4da45bef</code></pre> |
Junio C Hamano | 0a23522 | 2009-03-06 08:21:09 | [diff] [blame] | 2496 | </div></div> |
Junio C Hamano | 6fb124c | 2008-06-13 10:04:01 | [diff] [blame] | 2497 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2498 | </ul></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2499 | </div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2500 | </div> |
| 2501 | <div class="sect1"> |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2502 | <h2 id="_common_diff_options">Common diff options</h2> |
| 2503 | <div class="sectionbody"> |
| 2504 | <div class="dlist"><dl> |
| 2505 | <dt class="hdlist1"> |
| 2506 | -p |
| 2507 | </dt> |
| 2508 | <dt class="hdlist1"> |
| 2509 | -u |
| 2510 | </dt> |
| 2511 | <dt class="hdlist1"> |
| 2512 | --patch |
| 2513 | </dt> |
| 2514 | <dd> |
| 2515 | <p> |
| 2516 | Generate patch (see section on generating patches). |
| 2517 | |
| 2518 | </p> |
| 2519 | </dd> |
| 2520 | <dt class="hdlist1"> |
| 2521 | -U<n> |
| 2522 | </dt> |
| 2523 | <dt class="hdlist1"> |
| 2524 | --unified=<n> |
| 2525 | </dt> |
| 2526 | <dd> |
| 2527 | <p> |
| 2528 | Generate diffs with <n> lines of context instead of |
| 2529 | the usual three. |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2530 | Implies <code>-p</code>. |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2531 | </p> |
| 2532 | </dd> |
| 2533 | <dt class="hdlist1"> |
| 2534 | --raw |
| 2535 | </dt> |
| 2536 | <dd> |
| 2537 | <p> |
| 2538 | Generate the raw format. |
| 2539 | |
| 2540 | </p> |
| 2541 | </dd> |
| 2542 | <dt class="hdlist1"> |
| 2543 | --patch-with-raw |
| 2544 | </dt> |
| 2545 | <dd> |
| 2546 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2547 | Synonym for <code>-p --raw</code>. |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2548 | </p> |
| 2549 | </dd> |
| 2550 | <dt class="hdlist1"> |
Junio C Hamano | 5a73f30 | 2011-10-14 05:58:34 | [diff] [blame] | 2551 | --minimal |
| 2552 | </dt> |
| 2553 | <dd> |
| 2554 | <p> |
| 2555 | Spend extra time to make sure the smallest possible |
| 2556 | diff is produced. |
| 2557 | </p> |
| 2558 | </dd> |
| 2559 | <dt class="hdlist1"> |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2560 | --patience |
| 2561 | </dt> |
| 2562 | <dd> |
| 2563 | <p> |
| 2564 | Generate a diff using the "patience diff" algorithm. |
| 2565 | </p> |
| 2566 | </dd> |
| 2567 | <dt class="hdlist1"> |
Junio C Hamano | aea9e6b | 2012-03-07 00:17:11 | [diff] [blame] | 2568 | --histogram |
| 2569 | </dt> |
| 2570 | <dd> |
| 2571 | <p> |
| 2572 | Generate a diff using the "histogram diff" algorithm. |
| 2573 | </p> |
| 2574 | </dd> |
| 2575 | <dt class="hdlist1"> |
Junio C Hamano | 80ad00d | 2013-02-18 00:19:03 | [diff] [blame] | 2576 | --diff-algorithm={patience|minimal|histogram|myers} |
| 2577 | </dt> |
| 2578 | <dd> |
| 2579 | <p> |
| 2580 | Choose a diff algorithm. The variants are as follows: |
| 2581 | </p> |
| 2582 | <div class="openblock"> |
| 2583 | <div class="content"> |
| 2584 | <div class="dlist"><dl> |
| 2585 | <dt class="hdlist1"> |
| 2586 | <code>default</code>, <code>myers</code> |
| 2587 | </dt> |
| 2588 | <dd> |
| 2589 | <p> |
| 2590 | The basic greedy diff algorithm. Currently, this is the default. |
| 2591 | </p> |
| 2592 | </dd> |
| 2593 | <dt class="hdlist1"> |
| 2594 | <code>minimal</code> |
| 2595 | </dt> |
| 2596 | <dd> |
| 2597 | <p> |
| 2598 | Spend extra time to make sure the smallest possible diff is |
| 2599 | produced. |
| 2600 | </p> |
| 2601 | </dd> |
| 2602 | <dt class="hdlist1"> |
| 2603 | <code>patience</code> |
| 2604 | </dt> |
| 2605 | <dd> |
| 2606 | <p> |
| 2607 | Use "patience diff" algorithm when generating patches. |
| 2608 | </p> |
| 2609 | </dd> |
| 2610 | <dt class="hdlist1"> |
| 2611 | <code>histogram</code> |
| 2612 | </dt> |
| 2613 | <dd> |
| 2614 | <p> |
| 2615 | This algorithm extends the patience algorithm to "support |
| 2616 | low-occurrence common elements". |
| 2617 | </p> |
| 2618 | </dd> |
| 2619 | </dl></div> |
| 2620 | </div></div> |
| 2621 | <div class="paragraph"><p>For instance, if you configured diff.algorithm variable to a |
| 2622 | non-default value and want to use the default one, then you |
| 2623 | have to use <code>--diff-algorithm=default</code> option.</p></div> |
| 2624 | </dd> |
| 2625 | <dt class="hdlist1"> |
Junio C Hamano | 4c4b012 | 2011-06-30 01:19:32 | [diff] [blame] | 2626 | --stat[=<width>[,<name-width>[,<count>]]] |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2627 | </dt> |
| 2628 | <dd> |
| 2629 | <p> |
Junio C Hamano | aea9e6b | 2012-03-07 00:17:11 | [diff] [blame] | 2630 | Generate a diffstat. By default, as much space as necessary |
| 2631 | will be used for the filename part, and the rest for the graph |
| 2632 | part. Maximum width defaults to terminal width, or 80 columns |
Junio C Hamano | 7f2b3cb | 2012-06-22 22:42:39 | [diff] [blame] | 2633 | if not connected to a terminal, and can be overridden by |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2634 | <code><width></code>. The width of the filename part can be limited by |
| 2635 | giving another width <code><name-width></code> after a comma. The width |
Junio C Hamano | aea9e6b | 2012-03-07 00:17:11 | [diff] [blame] | 2636 | of the graph part can be limited by using |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2637 | <code>--stat-graph-width=<width></code> (affects all commands generating |
| 2638 | a stat graph) or by setting <code>diff.statGraphWidth=<width></code> |
| 2639 | (does not affect <code>git format-patch</code>). |
| 2640 | By giving a third parameter <code><count></code>, you can limit the |
| 2641 | output to the first <code><count></code> lines, followed by <code>...</code> if |
Junio C Hamano | aea9e6b | 2012-03-07 00:17:11 | [diff] [blame] | 2642 | there are more. |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2643 | </p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2644 | <div class="paragraph"><p>These parameters can also be set individually with <code>--stat-width=<width></code>, |
| 2645 | <code>--stat-name-width=<name-width></code> and <code>--stat-count=<count></code>.</p></div> |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2646 | </dd> |
| 2647 | <dt class="hdlist1"> |
| 2648 | --numstat |
| 2649 | </dt> |
| 2650 | <dd> |
| 2651 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2652 | Similar to <code>--stat</code>, but shows number of added and |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2653 | deleted lines in decimal notation and pathname without |
| 2654 | abbreviation, to make it more machine friendly. For |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2655 | binary files, outputs two <code>-</code> instead of saying |
| 2656 | <code>0 0</code>. |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2657 | </p> |
| 2658 | </dd> |
| 2659 | <dt class="hdlist1"> |
| 2660 | --shortstat |
| 2661 | </dt> |
| 2662 | <dd> |
| 2663 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2664 | Output only the last line of the <code>--stat</code> format containing total |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2665 | number of modified files, as well as number of added and deleted |
| 2666 | lines. |
| 2667 | </p> |
| 2668 | </dd> |
| 2669 | <dt class="hdlist1"> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 2670 | --dirstat[=<param1,param2,…>] |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2671 | </dt> |
| 2672 | <dd> |
| 2673 | <p> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 2674 | Output the distribution of relative amount of changes for each |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2675 | sub-directory. The behavior of <code>--dirstat</code> can be customized by |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 2676 | passing it a comma separated list of parameters. |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2677 | The defaults are controlled by the <code>diff.dirstat</code> configuration |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 2678 | variable (see <a href="git-config.html">git-config(1)</a>). |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 2679 | The following parameters are available: |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2680 | </p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2681 | <div class="openblock"> |
| 2682 | <div class="content"> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 2683 | <div class="dlist"><dl> |
| 2684 | <dt class="hdlist1"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2685 | <code>changes</code> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 2686 | </dt> |
| 2687 | <dd> |
| 2688 | <p> |
| 2689 | Compute the dirstat numbers by counting the lines that have been |
| 2690 | removed from the source, or added to the destination. This ignores |
| 2691 | the amount of pure code movements within a file. In other words, |
| 2692 | rearranging lines in a file is not counted as much as other changes. |
| 2693 | This is the default behavior when no parameter is given. |
| 2694 | </p> |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2695 | </dd> |
| 2696 | <dt class="hdlist1"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2697 | <code>lines</code> |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2698 | </dt> |
| 2699 | <dd> |
| 2700 | <p> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 2701 | Compute the dirstat numbers by doing the regular line-based diff |
| 2702 | analysis, and summing the removed/added line counts. (For binary |
| 2703 | files, count 64-byte chunks instead, since binary files have no |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2704 | natural concept of lines). This is a more expensive <code>--dirstat</code> |
| 2705 | behavior than the <code>changes</code> behavior, but it does count rearranged |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 2706 | lines within a file as much as other changes. The resulting output |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2707 | is consistent with what you get from the other <code>--*stat</code> options. |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2708 | </p> |
| 2709 | </dd> |
| 2710 | <dt class="hdlist1"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2711 | <code>files</code> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 2712 | </dt> |
| 2713 | <dd> |
| 2714 | <p> |
| 2715 | Compute the dirstat numbers by counting the number of files changed. |
| 2716 | Each changed file counts equally in the dirstat analysis. This is |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2717 | the computationally cheapest <code>--dirstat</code> behavior, since it does |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 2718 | not have to look at the file contents at all. |
| 2719 | </p> |
| 2720 | </dd> |
| 2721 | <dt class="hdlist1"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2722 | <code>cumulative</code> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 2723 | </dt> |
| 2724 | <dd> |
| 2725 | <p> |
| 2726 | Count changes in a child directory for the parent directory as well. |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2727 | Note that when using <code>cumulative</code>, the sum of the percentages |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 2728 | reported may exceed 100%. The default (non-cumulative) behavior can |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2729 | be specified with the <code>noncumulative</code> parameter. |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 2730 | </p> |
| 2731 | </dd> |
| 2732 | <dt class="hdlist1"> |
| 2733 | <limit> |
| 2734 | </dt> |
| 2735 | <dd> |
| 2736 | <p> |
| 2737 | An integer parameter specifies a cut-off percent (3% by default). |
| 2738 | Directories contributing less than this percentage of the changes |
| 2739 | are not shown in the output. |
| 2740 | </p> |
| 2741 | </dd> |
| 2742 | </dl></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2743 | </div></div> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 2744 | <div class="paragraph"><p>Example: The following will count changed files, while ignoring |
| 2745 | directories with less than 10% of the total amount of changed files, |
| 2746 | and accumulating child directory counts in the parent directories: |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2747 | <code>--dirstat=files,10,cumulative</code>.</p></div> |
Junio C Hamano | 1c222c5 | 2011-05-13 19:55:32 | [diff] [blame] | 2748 | </dd> |
| 2749 | <dt class="hdlist1"> |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2750 | --summary |
| 2751 | </dt> |
| 2752 | <dd> |
| 2753 | <p> |
| 2754 | Output a condensed summary of extended header information |
| 2755 | such as creations, renames and mode changes. |
| 2756 | </p> |
| 2757 | </dd> |
| 2758 | <dt class="hdlist1"> |
| 2759 | --patch-with-stat |
| 2760 | </dt> |
| 2761 | <dd> |
| 2762 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2763 | Synonym for <code>-p --stat</code>. |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2764 | </p> |
| 2765 | </dd> |
| 2766 | <dt class="hdlist1"> |
| 2767 | -z |
| 2768 | </dt> |
| 2769 | <dd> |
| 2770 | <p> |
| 2771 | Separate the commits with NULs instead of with new newlines. |
| 2772 | </p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2773 | <div class="paragraph"><p>Also, when <code>--raw</code> or <code>--numstat</code> has been given, do not munge |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2774 | pathnames and use NULs as output field terminators.</p></div> |
| 2775 | <div class="paragraph"><p>Without this option, each pathname output will have TAB, LF, double quotes, |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2776 | and backslash characters replaced with <code>\t</code>, <code>\n</code>, <code>\"</code>, and <code>\\</code>, |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2777 | respectively, and the pathname will be enclosed in double quotes if |
| 2778 | any of those replacements occurred.</p></div> |
| 2779 | </dd> |
| 2780 | <dt class="hdlist1"> |
| 2781 | --name-only |
| 2782 | </dt> |
| 2783 | <dd> |
| 2784 | <p> |
| 2785 | Show only names of changed files. |
| 2786 | </p> |
| 2787 | </dd> |
| 2788 | <dt class="hdlist1"> |
| 2789 | --name-status |
| 2790 | </dt> |
| 2791 | <dd> |
| 2792 | <p> |
| 2793 | Show only names and status of changed files. See the description |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2794 | of the <code>--diff-filter</code> option on what the status letters mean. |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2795 | </p> |
| 2796 | </dd> |
| 2797 | <dt class="hdlist1"> |
| 2798 | --submodule[=<format>] |
| 2799 | </dt> |
| 2800 | <dd> |
| 2801 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2802 | Specify how differences in submodules are shown. When <code>--submodule</code> |
| 2803 | or <code>--submodule=log</code> is given, the <em>log</em> format is used. This format lists |
| 2804 | the commits in the range like <a href="git-submodule.html">git-submodule(1)</a> <code>summary</code> does. |
| 2805 | Omitting the <code>--submodule</code> option or specifying <code>--submodule=short</code>, |
Junio C Hamano | e768cc1 | 2012-03-16 05:43:05 | [diff] [blame] | 2806 | uses the <em>short</em> format. This format just shows the names of the commits |
Junio C Hamano | b4e58b1 | 2012-11-26 03:13:06 | [diff] [blame] | 2807 | at the beginning and end of the range. Can be tweaked via the |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2808 | <code>diff.submodule</code> configuration variable. |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2809 | </p> |
| 2810 | </dd> |
| 2811 | <dt class="hdlist1"> |
| 2812 | --color[=<when>] |
| 2813 | </dt> |
| 2814 | <dd> |
| 2815 | <p> |
| 2816 | Show colored diff. |
Junio C Hamano | 947ab82 | 2013-03-19 23:07:29 | [diff] [blame] | 2817 | <code>--color</code> (i.e. without <em>=<when></em>) is the same as <code>--color=always</code>. |
| 2818 | <em><when></em> can be one of <code>always</code>, <code>never</code>, or <code>auto</code>. |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2819 | </p> |
| 2820 | </dd> |
| 2821 | <dt class="hdlist1"> |
| 2822 | --no-color |
| 2823 | </dt> |
| 2824 | <dd> |
| 2825 | <p> |
Junio C Hamano | 5f2627d | 2011-05-06 20:23:48 | [diff] [blame] | 2826 | Turn off colored diff. |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2827 | It is the same as <code>--color=never</code>. |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2828 | </p> |
| 2829 | </dd> |
| 2830 | <dt class="hdlist1"> |
| 2831 | --word-diff[=<mode>] |
| 2832 | </dt> |
| 2833 | <dd> |
| 2834 | <p> |
| 2835 | Show a word diff, using the <mode> to delimit changed words. |
| 2836 | By default, words are delimited by whitespace; see |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2837 | <code>--word-diff-regex</code> below. The <mode> defaults to <em>plain</em>, and |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2838 | must be one of: |
| 2839 | </p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2840 | <div class="openblock"> |
| 2841 | <div class="content"> |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2842 | <div class="dlist"><dl> |
| 2843 | <dt class="hdlist1"> |
| 2844 | color |
| 2845 | </dt> |
| 2846 | <dd> |
| 2847 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2848 | Highlight changed words using only colors. Implies <code>--color</code>. |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2849 | </p> |
| 2850 | </dd> |
| 2851 | <dt class="hdlist1"> |
| 2852 | plain |
| 2853 | </dt> |
| 2854 | <dd> |
| 2855 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2856 | Show words as <code>[-removed-]</code> and <code>{+added+}</code>. Makes no |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2857 | attempts to escape the delimiters if they appear in the input, |
| 2858 | so the output may be ambiguous. |
| 2859 | </p> |
| 2860 | </dd> |
| 2861 | <dt class="hdlist1"> |
| 2862 | porcelain |
| 2863 | </dt> |
| 2864 | <dd> |
| 2865 | <p> |
| 2866 | Use a special line-based format intended for script |
| 2867 | consumption. Added/removed/unchanged runs are printed in the |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2868 | usual unified diff format, starting with a <code>+</code>/<code>-</code>/` ` |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2869 | character at the beginning of the line and extending to the |
| 2870 | end of the line. Newlines in the input are represented by a |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2871 | tilde <code>~</code> on a line of its own. |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2872 | </p> |
| 2873 | </dd> |
| 2874 | <dt class="hdlist1"> |
| 2875 | none |
| 2876 | </dt> |
| 2877 | <dd> |
| 2878 | <p> |
| 2879 | Disable word diff again. |
| 2880 | </p> |
| 2881 | </dd> |
| 2882 | </dl></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2883 | </div></div> |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2884 | <div class="paragraph"><p>Note that despite the name of the first mode, color is used to |
| 2885 | highlight the changed parts in all modes if enabled.</p></div> |
| 2886 | </dd> |
| 2887 | <dt class="hdlist1"> |
| 2888 | --word-diff-regex=<regex> |
| 2889 | </dt> |
| 2890 | <dd> |
| 2891 | <p> |
| 2892 | Use <regex> to decide what a word is, instead of considering |
| 2893 | runs of non-whitespace to be a word. Also implies |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2894 | <code>--word-diff</code> unless it was already enabled. |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2895 | </p> |
| 2896 | <div class="paragraph"><p>Every non-overlapping match of the |
| 2897 | <regex> is considered a word. Anything between these matches is |
| 2898 | considered whitespace and ignored(!) for the purposes of finding |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2899 | differences. You may want to append <code>|[^[:space:]]</code> to your regular |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2900 | expression to make sure that it matches all non-whitespace characters. |
| 2901 | A match that contains a newline is silently truncated(!) at the |
| 2902 | newline.</p></div> |
| 2903 | <div class="paragraph"><p>The regex can also be set via a diff driver or configuration option, see |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 2904 | <a href="gitattributes.html">gitattributes(1)</a> or <a href="git-config.html">git-config(1)</a>. Giving it explicitly |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2905 | overrides any diff driver or configuration setting. Diff drivers |
| 2906 | override configuration settings.</p></div> |
| 2907 | </dd> |
| 2908 | <dt class="hdlist1"> |
| 2909 | --color-words[=<regex>] |
| 2910 | </dt> |
| 2911 | <dd> |
| 2912 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2913 | Equivalent to <code>--word-diff=color</code> plus (if a regex was |
| 2914 | specified) <code>--word-diff-regex=<regex></code>. |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2915 | </p> |
| 2916 | </dd> |
| 2917 | <dt class="hdlist1"> |
| 2918 | --no-renames |
| 2919 | </dt> |
| 2920 | <dd> |
| 2921 | <p> |
| 2922 | Turn off rename detection, even when the configuration |
| 2923 | file gives the default to do so. |
| 2924 | </p> |
| 2925 | </dd> |
| 2926 | <dt class="hdlist1"> |
| 2927 | --check |
| 2928 | </dt> |
| 2929 | <dd> |
| 2930 | <p> |
Junio C Hamano | 6005bfa | 2011-06-23 00:51:22 | [diff] [blame] | 2931 | Warn if changes introduce whitespace errors. What are |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2932 | considered whitespace errors is controlled by <code>core.whitespace</code> |
Junio C Hamano | 6005bfa | 2011-06-23 00:51:22 | [diff] [blame] | 2933 | configuration. By default, trailing whitespaces (including |
| 2934 | lines that solely consist of whitespaces) and a space character |
| 2935 | that is immediately followed by a tab character inside the |
| 2936 | initial indent of the line are considered whitespace errors. |
| 2937 | Exits with non-zero status if problems are found. Not compatible |
| 2938 | with --exit-code. |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2939 | </p> |
| 2940 | </dd> |
| 2941 | <dt class="hdlist1"> |
| 2942 | --full-index |
| 2943 | </dt> |
| 2944 | <dd> |
| 2945 | <p> |
| 2946 | Instead of the first handful of characters, show the full |
| 2947 | pre- and post-image blob object names on the "index" |
| 2948 | line when generating patch format output. |
| 2949 | </p> |
| 2950 | </dd> |
| 2951 | <dt class="hdlist1"> |
| 2952 | --binary |
| 2953 | </dt> |
| 2954 | <dd> |
| 2955 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2956 | In addition to <code>--full-index</code>, output a binary diff that |
| 2957 | can be applied with <code>git-apply</code>. |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2958 | </p> |
| 2959 | </dd> |
| 2960 | <dt class="hdlist1"> |
| 2961 | --abbrev[=<n>] |
| 2962 | </dt> |
| 2963 | <dd> |
| 2964 | <p> |
| 2965 | Instead of showing the full 40-byte hexadecimal object |
| 2966 | name in diff-raw format output and diff-tree header |
| 2967 | lines, show only a partial prefix. This is |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2968 | independent of the <code>--full-index</code> option above, which controls |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2969 | the diff-patch output format. Non default number of |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2970 | digits can be specified with <code>--abbrev=<n></code>. |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2971 | </p> |
| 2972 | </dd> |
| 2973 | <dt class="hdlist1"> |
| 2974 | -B[<n>][/<m>] |
| 2975 | </dt> |
| 2976 | <dt class="hdlist1"> |
| 2977 | --break-rewrites[=[<n>][/<m>]] |
| 2978 | </dt> |
| 2979 | <dd> |
| 2980 | <p> |
| 2981 | Break complete rewrite changes into pairs of delete and |
| 2982 | create. This serves two purposes: |
| 2983 | </p> |
| 2984 | <div class="paragraph"><p>It affects the way a change that amounts to a total rewrite of a file |
| 2985 | not as a series of deletion and insertion mixed together with a very |
| 2986 | few lines that happen to match textually as the context, but as a |
| 2987 | single deletion of everything old followed by a single insertion of |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2988 | everything new, and the number <code>m</code> controls this aspect of the -B |
| 2989 | option (defaults to 60%). <code>-B/70%</code> specifies that less than 30% of the |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 2990 | original should remain in the result for Git to consider it a total |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2991 | rewrite (i.e. otherwise the resulting patch will be a series of |
| 2992 | deletion and insertion mixed together with context lines).</p></div> |
| 2993 | <div class="paragraph"><p>When used with -M, a totally-rewritten file is also considered as the |
| 2994 | source of a rename (usually -M only considers a file that disappeared |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 2995 | as the source of a rename), and the number <code>n</code> controls this aspect of |
| 2996 | the -B option (defaults to 50%). <code>-B20%</code> specifies that a change with |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 2997 | addition and deletion compared to 20% or more of the file’s size are |
| 2998 | eligible for being picked up as a possible source of a rename to |
| 2999 | another file.</p></div> |
| 3000 | </dd> |
| 3001 | <dt class="hdlist1"> |
| 3002 | -M[<n>] |
| 3003 | </dt> |
| 3004 | <dt class="hdlist1"> |
| 3005 | --find-renames[=<n>] |
| 3006 | </dt> |
| 3007 | <dd> |
| 3008 | <p> |
| 3009 | If generating diffs, detect and report renames for each commit. |
| 3010 | For following files across renames while traversing history, see |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3011 | <code>--follow</code>. |
| 3012 | If <code>n</code> is specified, it is a threshold on the similarity |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 3013 | index (i.e. amount of addition/deletions compared to the |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 3014 | file’s size). For example, <code>-M90%</code> means Git should consider a |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 3015 | delete/add pair to be a rename if more than 90% of the file |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3016 | hasn’t changed. Without a <code>%</code> sign, the number is to be read as |
| 3017 | a fraction, with a decimal point before it. I.e., <code>-M5</code> becomes |
| 3018 | 0.5, and is thus the same as <code>-M50%</code>. Similarly, <code>-M05</code> is |
| 3019 | the same as <code>-M5%</code>. To limit detection to exact renames, use |
| 3020 | <code>-M100%</code>. |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 3021 | </p> |
| 3022 | </dd> |
| 3023 | <dt class="hdlist1"> |
| 3024 | -C[<n>] |
| 3025 | </dt> |
| 3026 | <dt class="hdlist1"> |
| 3027 | --find-copies[=<n>] |
| 3028 | </dt> |
| 3029 | <dd> |
| 3030 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3031 | Detect copies as well as renames. See also <code>--find-copies-harder</code>. |
| 3032 | If <code>n</code> is specified, it has the same meaning as for <code>-M<n></code>. |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 3033 | </p> |
| 3034 | </dd> |
| 3035 | <dt class="hdlist1"> |
| 3036 | --find-copies-harder |
| 3037 | </dt> |
| 3038 | <dd> |
| 3039 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3040 | For performance reasons, by default, <code>-C</code> option finds copies only |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 3041 | if the original file of the copy was modified in the same |
| 3042 | changeset. This flag makes the command |
| 3043 | inspect unmodified files as candidates for the source of |
| 3044 | copy. This is a very expensive operation for large |
| 3045 | projects, so use it with caution. Giving more than one |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3046 | <code>-C</code> option has the same effect. |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 3047 | </p> |
| 3048 | </dd> |
| 3049 | <dt class="hdlist1"> |
Junio C Hamano | b02377c | 2011-04-28 22:26:02 | [diff] [blame] | 3050 | -D |
| 3051 | </dt> |
| 3052 | <dt class="hdlist1"> |
| 3053 | --irreversible-delete |
| 3054 | </dt> |
| 3055 | <dd> |
| 3056 | <p> |
| 3057 | Omit the preimage for deletes, i.e. print only the header but not |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3058 | the diff between the preimage and <code>/dev/null</code>. The resulting patch |
| 3059 | is not meant to be applied with <code>patch</code> nor <code>git apply</code>; this is |
Junio C Hamano | b02377c | 2011-04-28 22:26:02 | [diff] [blame] | 3060 | solely for people who want to just concentrate on reviewing the |
| 3061 | text after the change. In addition, the output obviously lack |
| 3062 | enough information to apply such a patch in reverse, even manually, |
| 3063 | hence the name of the option. |
| 3064 | </p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3065 | <div class="paragraph"><p>When used together with <code>-B</code>, omit also the preimage in the deletion part |
Junio C Hamano | b02377c | 2011-04-28 22:26:02 | [diff] [blame] | 3066 | of a delete/create pair.</p></div> |
| 3067 | </dd> |
| 3068 | <dt class="hdlist1"> |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 3069 | -l<num> |
| 3070 | </dt> |
| 3071 | <dd> |
| 3072 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3073 | The <code>-M</code> and <code>-C</code> options require O(n^2) processing time where n |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 3074 | is the number of potential rename/copy targets. This |
| 3075 | option prevents rename/copy detection from running if |
| 3076 | the number of rename/copy targets exceeds the specified |
| 3077 | number. |
| 3078 | </p> |
| 3079 | </dd> |
| 3080 | <dt class="hdlist1"> |
| 3081 | --diff-filter=[(A|C|D|M|R|T|U|X|B)…[*]] |
| 3082 | </dt> |
| 3083 | <dd> |
| 3084 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3085 | Select only files that are Added (<code>A</code>), Copied (<code>C</code>), |
| 3086 | Deleted (<code>D</code>), Modified (<code>M</code>), Renamed (<code>R</code>), have their |
| 3087 | type (i.e. regular file, symlink, submodule, …) changed (<code>T</code>), |
| 3088 | are Unmerged (<code>U</code>), are |
| 3089 | Unknown (<code>X</code>), or have had their pairing Broken (<code>B</code>). |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 3090 | Any combination of the filter characters (including none) can be used. |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3091 | When <code>*</code> (All-or-none) is added to the combination, all |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 3092 | paths are selected if there is any file that matches |
| 3093 | other criteria in the comparison; if there is no file |
| 3094 | that matches other criteria, nothing is selected. |
| 3095 | </p> |
| 3096 | </dd> |
| 3097 | <dt class="hdlist1"> |
| 3098 | -S<string> |
| 3099 | </dt> |
| 3100 | <dd> |
| 3101 | <p> |
| 3102 | Look for differences that introduce or remove an instance of |
| 3103 | <string>. Note that this is different than the string simply |
| 3104 | appearing in diff output; see the <em>pickaxe</em> entry in |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 3105 | <a href="gitdiffcore.html">gitdiffcore(7)</a> for more details. |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 3106 | </p> |
| 3107 | </dd> |
| 3108 | <dt class="hdlist1"> |
| 3109 | -G<regex> |
| 3110 | </dt> |
| 3111 | <dd> |
| 3112 | <p> |
| 3113 | Look for differences whose added or removed line matches |
| 3114 | the given <regex>. |
| 3115 | </p> |
| 3116 | </dd> |
| 3117 | <dt class="hdlist1"> |
| 3118 | --pickaxe-all |
| 3119 | </dt> |
| 3120 | <dd> |
| 3121 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3122 | When <code>-S</code> or <code>-G</code> finds a change, show all the changes in that |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 3123 | changeset, not just the files that contain the change |
| 3124 | in <string>. |
| 3125 | </p> |
| 3126 | </dd> |
| 3127 | <dt class="hdlist1"> |
| 3128 | --pickaxe-regex |
| 3129 | </dt> |
| 3130 | <dd> |
| 3131 | <p> |
| 3132 | Make the <string> not a plain string but an extended POSIX |
| 3133 | regex to match. |
| 3134 | </p> |
| 3135 | </dd> |
| 3136 | <dt class="hdlist1"> |
| 3137 | -O<orderfile> |
| 3138 | </dt> |
| 3139 | <dd> |
| 3140 | <p> |
| 3141 | Output the patch in the order specified in the |
| 3142 | <orderfile>, which has one shell glob pattern per line. |
| 3143 | </p> |
| 3144 | </dd> |
| 3145 | <dt class="hdlist1"> |
| 3146 | -R |
| 3147 | </dt> |
| 3148 | <dd> |
| 3149 | <p> |
| 3150 | Swap two inputs; that is, show differences from index or |
| 3151 | on-disk file to tree contents. |
| 3152 | </p> |
| 3153 | </dd> |
| 3154 | <dt class="hdlist1"> |
| 3155 | --relative[=<path>] |
| 3156 | </dt> |
| 3157 | <dd> |
| 3158 | <p> |
| 3159 | When run from a subdirectory of the project, it can be |
| 3160 | told to exclude changes outside the directory and show |
| 3161 | pathnames relative to it with this option. When you are |
| 3162 | not in a subdirectory (e.g. in a bare repository), you |
| 3163 | can name which subdirectory to make the output relative |
| 3164 | to by giving a <path> as an argument. |
| 3165 | </p> |
| 3166 | </dd> |
| 3167 | <dt class="hdlist1"> |
| 3168 | -a |
| 3169 | </dt> |
| 3170 | <dt class="hdlist1"> |
| 3171 | --text |
| 3172 | </dt> |
| 3173 | <dd> |
| 3174 | <p> |
| 3175 | Treat all files as text. |
| 3176 | </p> |
| 3177 | </dd> |
| 3178 | <dt class="hdlist1"> |
| 3179 | --ignore-space-at-eol |
| 3180 | </dt> |
| 3181 | <dd> |
| 3182 | <p> |
| 3183 | Ignore changes in whitespace at EOL. |
| 3184 | </p> |
| 3185 | </dd> |
| 3186 | <dt class="hdlist1"> |
| 3187 | -b |
| 3188 | </dt> |
| 3189 | <dt class="hdlist1"> |
| 3190 | --ignore-space-change |
| 3191 | </dt> |
| 3192 | <dd> |
| 3193 | <p> |
| 3194 | Ignore changes in amount of whitespace. This ignores whitespace |
| 3195 | at line end, and considers all other sequences of one or |
| 3196 | more whitespace characters to be equivalent. |
| 3197 | </p> |
| 3198 | </dd> |
| 3199 | <dt class="hdlist1"> |
| 3200 | -w |
| 3201 | </dt> |
| 3202 | <dt class="hdlist1"> |
| 3203 | --ignore-all-space |
| 3204 | </dt> |
| 3205 | <dd> |
| 3206 | <p> |
| 3207 | Ignore whitespace when comparing lines. This ignores |
| 3208 | differences even if one line has whitespace where the other |
| 3209 | line has none. |
| 3210 | </p> |
| 3211 | </dd> |
| 3212 | <dt class="hdlist1"> |
| 3213 | --inter-hunk-context=<lines> |
| 3214 | </dt> |
| 3215 | <dd> |
| 3216 | <p> |
| 3217 | Show the context between diff hunks, up to the specified number |
| 3218 | of lines, thereby fusing hunks that are close to each other. |
| 3219 | </p> |
| 3220 | </dd> |
| 3221 | <dt class="hdlist1"> |
Junio C Hamano | 11821ed | 2011-10-19 18:42:09 | [diff] [blame] | 3222 | -W |
| 3223 | </dt> |
| 3224 | <dt class="hdlist1"> |
| 3225 | --function-context |
| 3226 | </dt> |
| 3227 | <dd> |
| 3228 | <p> |
| 3229 | Show whole surrounding functions of changes. |
| 3230 | </p> |
| 3231 | </dd> |
| 3232 | <dt class="hdlist1"> |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 3233 | --ext-diff |
| 3234 | </dt> |
| 3235 | <dd> |
| 3236 | <p> |
| 3237 | Allow an external diff helper to be executed. If you set an |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 3238 | external diff driver with <a href="gitattributes.html">gitattributes(5)</a>, you need |
| 3239 | to use this option with <a href="git-log.html">git-log(1)</a> and friends. |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 3240 | </p> |
| 3241 | </dd> |
| 3242 | <dt class="hdlist1"> |
| 3243 | --no-ext-diff |
| 3244 | </dt> |
| 3245 | <dd> |
| 3246 | <p> |
| 3247 | Disallow external diff drivers. |
| 3248 | </p> |
| 3249 | </dd> |
| 3250 | <dt class="hdlist1"> |
Junio C Hamano | c652aed | 2011-07-07 01:14:31 | [diff] [blame] | 3251 | --textconv |
| 3252 | </dt> |
| 3253 | <dt class="hdlist1"> |
| 3254 | --no-textconv |
| 3255 | </dt> |
| 3256 | <dd> |
| 3257 | <p> |
| 3258 | Allow (or disallow) external text conversion filters to be run |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 3259 | when comparing binary files. See <a href="gitattributes.html">gitattributes(5)</a> for |
Junio C Hamano | c652aed | 2011-07-07 01:14:31 | [diff] [blame] | 3260 | details. Because textconv filters are typically a one-way |
| 3261 | conversion, the resulting diff is suitable for human |
| 3262 | consumption, but cannot be applied. For this reason, textconv |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 3263 | filters are enabled by default only for <a href="git-diff.html">git-diff(1)</a> and |
| 3264 | <a href="git-log.html">git-log(1)</a>, but not for <a href="git-format-patch.html">git-format-patch(1)</a> or |
Junio C Hamano | c652aed | 2011-07-07 01:14:31 | [diff] [blame] | 3265 | diff plumbing commands. |
| 3266 | </p> |
| 3267 | </dd> |
| 3268 | <dt class="hdlist1"> |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 3269 | --ignore-submodules[=<when>] |
| 3270 | </dt> |
| 3271 | <dd> |
| 3272 | <p> |
| 3273 | Ignore changes to submodules in the diff generation. <when> can be |
| 3274 | either "none", "untracked", "dirty" or "all", which is the default |
| 3275 | Using "none" will consider the submodule modified when it either contains |
| 3276 | untracked or modified files or its HEAD differs from the commit recorded |
| 3277 | in the superproject and can be used to override any settings of the |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 3278 | <em>ignore</em> option in <a href="git-config.html">git-config(1)</a> or <a href="gitmodules.html">gitmodules(5)</a>. When |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 3279 | "untracked" is used submodules are not considered dirty when they only |
| 3280 | contain untracked content (but they are still scanned for modified |
| 3281 | content). Using "dirty" ignores all changes to the work tree of submodules, |
| 3282 | only changes to the commits stored in the superproject are shown (this was |
| 3283 | the behavior until 1.7.0). Using "all" hides all changes to submodules. |
| 3284 | </p> |
| 3285 | </dd> |
| 3286 | <dt class="hdlist1"> |
| 3287 | --src-prefix=<prefix> |
| 3288 | </dt> |
| 3289 | <dd> |
| 3290 | <p> |
| 3291 | Show the given source prefix instead of "a/". |
| 3292 | </p> |
| 3293 | </dd> |
| 3294 | <dt class="hdlist1"> |
| 3295 | --dst-prefix=<prefix> |
| 3296 | </dt> |
| 3297 | <dd> |
| 3298 | <p> |
| 3299 | Show the given destination prefix instead of "b/". |
| 3300 | </p> |
| 3301 | </dd> |
| 3302 | <dt class="hdlist1"> |
| 3303 | --no-prefix |
| 3304 | </dt> |
| 3305 | <dd> |
| 3306 | <p> |
| 3307 | Do not show any source or destination prefix. |
| 3308 | </p> |
| 3309 | </dd> |
| 3310 | </dl></div> |
| 3311 | <div class="paragraph"><p>For more detailed explanation on these common options, see also |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 3312 | <a href="gitdiffcore.html">gitdiffcore(7)</a>.</p></div> |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 3313 | </div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3314 | </div> |
| 3315 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 3316 | <h2 id="_generating_patches_with_p">Generating patches with -p</h2> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3317 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3318 | <div class="paragraph"><p>When "git-diff-index", "git-diff-tree", or "git-diff-files" are run |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3319 | with a <em>-p</em> option, "git diff" without the <em>--raw</em> option, or |
| 3320 | "git log" with the "-p" option, they |
| 3321 | do not produce the output described above; instead they produce a |
| 3322 | patch file. You can customize the creation of such patches via the |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 3323 | GIT_EXTERNAL_DIFF and the GIT_DIFF_OPTS environment variables.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3324 | <div class="paragraph"><p>What the -p option produces is slightly different from the traditional |
Junio C Hamano | 7f9fa86 | 2010-10-19 23:51:14 | [diff] [blame] | 3325 | diff format:</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3326 | <div class="olist arabic"><ol class="arabic"> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3327 | <li> |
| 3328 | <p> |
Junio C Hamano | 7f9fa86 | 2010-10-19 23:51:14 | [diff] [blame] | 3329 | It is preceded with a "git diff" header that looks like this: |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3330 | </p> |
| 3331 | <div class="literalblock"> |
| 3332 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3333 | <pre><code>diff --git a/file1 b/file2</code></pre> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3334 | </div></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3335 | <div class="paragraph"><p>The <code>a/</code> and <code>b/</code> filenames are the same unless rename/copy is |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3336 | involved. Especially, even for a creation or a deletion, |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3337 | <code>/dev/null</code> is <em>not</em> used in place of the <code>a/</code> or <code>b/</code> filenames.</p></div> |
| 3338 | <div class="paragraph"><p>When rename/copy is involved, <code>file1</code> and <code>file2</code> show the |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3339 | name of the source file of the rename/copy and the name of |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 3340 | the file that rename/copy produces, respectively.</p></div> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3341 | </li> |
| 3342 | <li> |
| 3343 | <p> |
| 3344 | It is followed by one or more extended header lines: |
| 3345 | </p> |
| 3346 | <div class="literalblock"> |
| 3347 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3348 | <pre><code>old mode <mode> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3349 | new mode <mode> |
| 3350 | deleted file mode <mode> |
| 3351 | new file mode <mode> |
| 3352 | copy from <path> |
| 3353 | copy to <path> |
| 3354 | rename from <path> |
| 3355 | rename to <path> |
| 3356 | similarity index <number> |
| 3357 | dissimilarity index <number> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3358 | index <hash>..<hash> <mode></code></pre> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3359 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3360 | <div class="paragraph"><p>File modes are printed as 6-digit octal numbers including the file type |
Junio C Hamano | 7f9fa86 | 2010-10-19 23:51:14 | [diff] [blame] | 3361 | and file permission bits.</p></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3362 | <div class="paragraph"><p>Path names in extended headers do not include the <code>a/</code> and <code>b/</code> prefixes.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3363 | <div class="paragraph"><p>The similarity index is the percentage of unchanged lines, and |
Junio C Hamano | 7f9fa86 | 2010-10-19 23:51:14 | [diff] [blame] | 3364 | the dissimilarity index is the percentage of changed lines. It |
| 3365 | is a rounded down integer, followed by a percent sign. The |
| 3366 | similarity index value of 100% is thus reserved for two equal |
| 3367 | files, while 100% dissimilarity means that no line from the old |
| 3368 | file made it into the new one.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3369 | <div class="paragraph"><p>The index line includes the SHA-1 checksum before and after the change. |
Junio C Hamano | 7f9fa86 | 2010-10-19 23:51:14 | [diff] [blame] | 3370 | The <mode> is included if the file mode does not change; otherwise, |
| 3371 | separate lines indicate the old and the new mode.</p></div> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3372 | </li> |
| 3373 | <li> |
| 3374 | <p> |
| 3375 | TAB, LF, double quote and backslash characters in pathnames |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3376 | are represented as <code>\t</code>, <code>\n</code>, <code>\"</code> and <code>\\</code>, respectively. |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3377 | If there is need for such substitution then the whole |
| 3378 | pathname is put in double quotes. |
| 3379 | </p> |
| 3380 | </li> |
Junio C Hamano | 7f9fa86 | 2010-10-19 23:51:14 | [diff] [blame] | 3381 | <li> |
| 3382 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3383 | All the <code>file1</code> files in the output refer to files before the |
| 3384 | commit, and all the <code>file2</code> files refer to files after the commit. |
Junio C Hamano | 7f9fa86 | 2010-10-19 23:51:14 | [diff] [blame] | 3385 | It is incorrect to apply each change to each file sequentially. For |
| 3386 | example, this patch will swap a and b: |
| 3387 | </p> |
| 3388 | <div class="literalblock"> |
| 3389 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3390 | <pre><code>diff --git a/a b/b |
Junio C Hamano | 7f9fa86 | 2010-10-19 23:51:14 | [diff] [blame] | 3391 | rename from a |
| 3392 | rename to b |
| 3393 | diff --git a/b b/a |
| 3394 | rename from b |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3395 | rename to a</code></pre> |
Junio C Hamano | 7f9fa86 | 2010-10-19 23:51:14 | [diff] [blame] | 3396 | </div></div> |
| 3397 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 3398 | </ol></div> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3399 | </div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3400 | </div> |
| 3401 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 3402 | <h2 id="_combined_diff_format">combined diff format</h2> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3403 | <div class="sectionbody"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3404 | <div class="paragraph"><p>Any diff-generating command can take the ‘-c` or <code>--cc</code> option to |
Junio C Hamano | c5be4cc | 2011-03-09 07:20:43 | [diff] [blame] | 3405 | produce a <em>combined diff</em> when showing a merge. This is the default |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 3406 | format when showing merges with <a href="git-diff.html">git-diff(1)</a> or |
| 3407 | <a href="git-show.html">git-show(1)</a>. Note also that you can give the `-m’ option to any |
Junio C Hamano | c5be4cc | 2011-03-09 07:20:43 | [diff] [blame] | 3408 | of these commands to force generation of diffs with individual parents |
| 3409 | of a merge.</p></div> |
| 3410 | <div class="paragraph"><p>A <em>combined diff</em> format looks like this:</p></div> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3411 | <div class="listingblock"> |
| 3412 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3413 | <pre><code>diff --combined describe.c |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3414 | index fabadb8,cc95eb0..4866510 |
| 3415 | --- a/describe.c |
| 3416 | +++ b/describe.c |
| 3417 | @@@ -98,20 -98,12 +98,20 @@@ |
| 3418 | return (a_date > b_date) ? -1 : (a_date == b_date) ? 0 : 1; |
| 3419 | } |
| 3420 | |
| 3421 | - static void describe(char *arg) |
| 3422 | -static void describe(struct commit *cmit, int last_one) |
| 3423 | ++static void describe(char *arg, int last_one) |
| 3424 | { |
| 3425 | + unsigned char sha1[20]; |
| 3426 | + struct commit *cmit; |
| 3427 | struct commit_list *list; |
| 3428 | static int initialized = 0; |
| 3429 | struct commit_name *n; |
| 3430 | |
| 3431 | + if (get_sha1(arg, sha1) < 0) |
| 3432 | + usage(describe_usage); |
| 3433 | + cmit = lookup_commit_reference(sha1); |
| 3434 | + if (!cmit) |
| 3435 | + usage(describe_usage); |
| 3436 | + |
| 3437 | if (!initialized) { |
| 3438 | initialized = 1; |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3439 | for_each_ref(get_name);</code></pre> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3440 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3441 | <div class="olist arabic"><ol class="arabic"> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3442 | <li> |
| 3443 | <p> |
| 3444 | It is preceded with a "git diff" header, that looks like |
| 3445 | this (when <em>-c</em> option is used): |
| 3446 | </p> |
| 3447 | <div class="literalblock"> |
| 3448 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3449 | <pre><code>diff --combined file</code></pre> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3450 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3451 | <div class="paragraph"><p>or like this (when <em>--cc</em> option is used):</p></div> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3452 | <div class="literalblock"> |
| 3453 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3454 | <pre><code>diff --cc file</code></pre> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3455 | </div></div> |
| 3456 | </li> |
| 3457 | <li> |
| 3458 | <p> |
| 3459 | It is followed by one or more extended header lines |
| 3460 | (this example shows a merge with two parents): |
| 3461 | </p> |
| 3462 | <div class="literalblock"> |
| 3463 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3464 | <pre><code>index <hash>,<hash>..<hash> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3465 | mode <mode>,<mode>..<mode> |
| 3466 | new file mode <mode> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3467 | deleted file mode <mode>,<mode></code></pre> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3468 | </div></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3469 | <div class="paragraph"><p>The <code>mode <mode>,<mode>..<mode></code> line appears only if at least one of |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3470 | the <mode> is different from the rest. Extended headers with |
| 3471 | information about detected contents movement (renames and |
| 3472 | copying detection) are designed to work with diff of two |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 3473 | <tree-ish> and are not used by combined diff format.</p></div> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3474 | </li> |
| 3475 | <li> |
| 3476 | <p> |
| 3477 | It is followed by two-line from-file/to-file header |
| 3478 | </p> |
| 3479 | <div class="literalblock"> |
| 3480 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3481 | <pre><code>--- a/file |
| 3482 | +++ b/file</code></pre> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3483 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3484 | <div class="paragraph"><p>Similar to two-line header for traditional <em>unified</em> diff |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3485 | format, <code>/dev/null</code> is used to signal created or deleted |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 3486 | files.</p></div> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3487 | </li> |
| 3488 | <li> |
| 3489 | <p> |
| 3490 | Chunk header format is modified to prevent people from |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3491 | accidentally feeding it to <code>patch -p1</code>. Combined diff format |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3492 | was created for review of merge commit changes, and was not |
| 3493 | meant for apply. The change is similar to the change in the |
| 3494 | extended <em>index</em> header: |
| 3495 | </p> |
| 3496 | <div class="literalblock"> |
| 3497 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3498 | <pre><code>@@@ <from-file-range> <from-file-range> <to-file-range> @@@</code></pre> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3499 | </div></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3500 | <div class="paragraph"><p>There are (number of parents + 1) <code>@</code> characters in the chunk |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 3501 | header for combined diff format.</p></div> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3502 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 3503 | </ol></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3504 | <div class="paragraph"><p>Unlike the traditional <em>unified</em> diff format, which shows two |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3505 | files A and B with a single column that has <code>-</code> (minus — appears in A but removed in B), <code>+</code> (plus — missing in A but |
| 3506 | added to B), or <code>" "</code> (space — unchanged) prefix, this format |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3507 | compares two or more files file1, file2,… with one file X, and |
| 3508 | shows how X differs from each of fileN. One column for each of |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3509 | fileN is prepended to the output line to note how X’s line is |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 3510 | different from it.</p></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3511 | <div class="paragraph"><p>A <code>-</code> character in the column N means that the line appears in |
| 3512 | fileN but it does not appear in the result. A <code>+</code> character |
Junio C Hamano | 54bf1e2 | 2008-12-20 06:30:11 | [diff] [blame] | 3513 | in the column N means that the line appears in the result, |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3514 | and fileN does not have that line (in other words, the line was |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 3515 | added, from the point of view of that parent).</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3516 | <div class="paragraph"><p>In the above example output, the function signature was changed |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3517 | from both files (hence two <code>-</code> removals from both file1 and |
| 3518 | file2, plus <code>++</code> to mean one line that was added does not appear |
Junio C Hamano | 54bf1e2 | 2008-12-20 06:30:11 | [diff] [blame] | 3519 | in either file1 nor file2). Also eight other lines are the same |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3520 | from file1 but do not appear in file2 (hence prefixed with <code>+</code>).</p></div> |
| 3521 | <div class="paragraph"><p>When shown by <code>git diff-tree -c</code>, it compares the parents of a |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3522 | merge commit with the merge result (i.e. file1..fileN are the |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3523 | parents). When shown by <code>git diff-files -c</code>, it compares the |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3524 | two unresolved merge parents with the working tree file |
| 3525 | (i.e. file1 is stage 2 aka "our version", file2 is stage 3 aka |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 3526 | "their version").</p></div> |
Junio C Hamano | 00b8b63 | 2007-12-07 09:50:49 | [diff] [blame] | 3527 | </div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3528 | </div> |
| 3529 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 3530 | <h2 id="_examples">Examples</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 3531 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3532 | <div class="dlist"><dl> |
| 3533 | <dt class="hdlist1"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3534 | <code>git log --no-merges</code> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 3535 | </dt> |
| 3536 | <dd> |
| 3537 | <p> |
| 3538 | Show the whole commit history, but skip any merges |
| 3539 | </p> |
| 3540 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3541 | <dt class="hdlist1"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3542 | <code>git log v2.6.12.. include/scsi drivers/scsi</code> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 3543 | </dt> |
| 3544 | <dd> |
| 3545 | <p> |
| 3546 | Show all commits since version <em>v2.6.12</em> that changed any file |
| 3547 | in the include/scsi or drivers/scsi subdirectories |
| 3548 | </p> |
| 3549 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3550 | <dt class="hdlist1"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3551 | <code>git log --since="2 weeks ago" -- gitk</code> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 3552 | </dt> |
| 3553 | <dd> |
| 3554 | <p> |
| 3555 | Show the changes during the last two weeks to the file <em>gitk</em>. |
| 3556 | The "--" is necessary to avoid confusion with the <strong>branch</strong> named |
| 3557 | <em>gitk</em> |
| 3558 | </p> |
| 3559 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3560 | <dt class="hdlist1"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3561 | <code>git log --name-status release..test</code> |
Junio C Hamano | ba7c8d8 | 2006-04-15 06:17:42 | [diff] [blame] | 3562 | </dt> |
| 3563 | <dd> |
| 3564 | <p> |
| 3565 | Show the commits that are in the "test" branch but not yet |
| 3566 | in the "release" branch, along with the list of paths |
| 3567 | each commit modifies. |
| 3568 | </p> |
| 3569 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3570 | <dt class="hdlist1"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3571 | <code>git log --follow builtin-rev-list.c</code> |
Junio C Hamano | 235d53f | 2007-07-13 00:25:15 | [diff] [blame] | 3572 | </dt> |
| 3573 | <dd> |
| 3574 | <p> |
| 3575 | Shows the commits that changed builtin-rev-list.c, including |
| 3576 | those commits that occurred before the file was given its |
| 3577 | present name. |
| 3578 | </p> |
| 3579 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3580 | <dt class="hdlist1"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3581 | <code>git log --branches --not --remotes=origin</code> |
Junio C Hamano | 57827fb | 2010-01-23 03:02:50 | [diff] [blame] | 3582 | </dt> |
| 3583 | <dd> |
| 3584 | <p> |
| 3585 | Shows all commits that are in any of local branches but not in |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 3586 | any of remote-tracking branches for <em>origin</em> (what you have that |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3587 | origin doesn’t). |
Junio C Hamano | 57827fb | 2010-01-23 03:02:50 | [diff] [blame] | 3588 | </p> |
| 3589 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3590 | <dt class="hdlist1"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3591 | <code>git log master --not --remotes=*/master</code> |
Junio C Hamano | 57827fb | 2010-01-23 03:02:50 | [diff] [blame] | 3592 | </dt> |
| 3593 | <dd> |
| 3594 | <p> |
| 3595 | Shows all commits that are in local master but not in any remote |
| 3596 | repository master branches. |
| 3597 | </p> |
| 3598 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3599 | <dt class="hdlist1"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3600 | <code>git log -p -m --first-parent</code> |
Junio C Hamano | 3166736 | 2010-03-25 00:38:53 | [diff] [blame] | 3601 | </dt> |
| 3602 | <dd> |
| 3603 | <p> |
| 3604 | Shows the history including change diffs, but only from the |
| 3605 | "main branch" perspective, skipping commits that come from merged |
| 3606 | branches, and showing full diffs of changes introduced by the merges. |
| 3607 | This makes sense only when following a strict policy of merging all |
| 3608 | topic branches when staying on a single integration branch. |
| 3609 | </p> |
| 3610 | </dd> |
Junio C Hamano | 693e709 | 2012-09-12 22:56:53 | [diff] [blame] | 3611 | <dt class="hdlist1"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3612 | <code>git log -3</code> |
Junio C Hamano | 693e709 | 2012-09-12 22:56:53 | [diff] [blame] | 3613 | </dt> |
| 3614 | <dd> |
| 3615 | <p> |
| 3616 | Limits the number of commits to show to 3. |
| 3617 | </p> |
| 3618 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 3619 | </dl></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 3620 | </div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3621 | </div> |
| 3622 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 3623 | <h2 id="_discussion">Discussion</h2> |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 3624 | <div class="sectionbody"> |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 3625 | <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] | 3626 | <div class="ulist"><ul> |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 3627 | <li> |
| 3628 | <p> |
| 3629 | The pathnames recorded in the index and in the tree objects |
| 3630 | are treated as uninterpreted sequences of non-NUL bytes. |
| 3631 | What readdir(2) returns are what are recorded and compared |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 3632 | with the data Git keeps track of, which in turn are expected |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 3633 | to be what lstat(2) and creat(2) accepts. There is no such |
| 3634 | thing as pathname encoding translation. |
| 3635 | </p> |
| 3636 | </li> |
| 3637 | <li> |
| 3638 | <p> |
Junio C Hamano | 54bf1e2 | 2008-12-20 06:30:11 | [diff] [blame] | 3639 | The contents of the blob objects are uninterpreted sequences |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 3640 | of bytes. There is no encoding translation at the core |
| 3641 | level. |
| 3642 | </p> |
| 3643 | </li> |
| 3644 | <li> |
| 3645 | <p> |
Junio C Hamano | 54bf1e2 | 2008-12-20 06:30:11 | [diff] [blame] | 3646 | The commit log messages are uninterpreted sequences of non-NUL |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 3647 | bytes. |
| 3648 | </p> |
| 3649 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 3650 | </ul></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3651 | <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] | 3652 | 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] | 3653 | force UTF-8 on projects. If all participants of a particular |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 3654 | project find it more convenient to use legacy encodings, Git |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 3655 | 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] | 3656 | mind.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3657 | <div class="olist arabic"><ol class="arabic"> |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 3658 | <li> |
| 3659 | <p> |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 3660 | <em>git commit</em> and <em>git commit-tree</em> issues |
Junio C Hamano | 14b7648 | 2008-01-05 10:32:26 | [diff] [blame] | 3661 | 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] | 3662 | like a valid UTF-8 string, unless you explicitly say your |
| 3663 | project uses a legacy encoding. The way to say this is to |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3664 | have i18n.commitencoding in <code>.git/config</code> file, like this: |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 3665 | </p> |
| 3666 | <div class="listingblock"> |
| 3667 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3668 | <pre><code>[i18n] |
| 3669 | commitencoding = ISO-8859-1</code></pre> |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 3670 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3671 | <div class="paragraph"><p>Commit objects created with the above setting record the value |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3672 | 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] | 3673 | help other people who look at them later. Lack of this header |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 3674 | 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] | 3675 | </li> |
| 3676 | <li> |
| 3677 | <p> |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 3678 | <em>git log</em>, <em>git show</em>, <em>git blame</em> and friends look at the |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3679 | <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] | 3680 | log message into UTF-8 unless otherwise specified. You can |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 3681 | specify the desired output encoding with |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3682 | <code>i18n.logoutputencoding</code> in <code>.git/config</code> file, like this: |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 3683 | </p> |
| 3684 | <div class="listingblock"> |
| 3685 | <div class="content"> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3686 | <pre><code>[i18n] |
| 3687 | logoutputencoding = ISO-8859-1</code></pre> |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 3688 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3689 | <div class="paragraph"><p>If you do not have this configuration variable, the value of |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3690 | <code>i18n.commitencoding</code> is used instead.</p></div> |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 3691 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 3692 | </ol></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3693 | <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] | 3694 | message when a commit is made to force UTF-8 at the commit |
| 3695 | object level, because re-coding to UTF-8 is not necessarily a |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 3696 | reversible operation.</p></div> |
Junio C Hamano | 775a0f4 | 2006-12-31 01:19:14 | [diff] [blame] | 3697 | </div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3698 | </div> |
| 3699 | <div class="sect1"> |
Junio C Hamano | a574a09 | 2010-06-13 19:57:10 | [diff] [blame] | 3700 | <h2 id="_configuration">Configuration</h2> |
| 3701 | <div class="sectionbody"> |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 3702 | <div class="paragraph"><p>See <a href="git-config.html">git-config(1)</a> for core variables and <a href="git-diff.html">git-diff(1)</a> |
Junio C Hamano | a574a09 | 2010-06-13 19:57:10 | [diff] [blame] | 3703 | for settings related to diff generation.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3704 | <div class="dlist"><dl> |
| 3705 | <dt class="hdlist1"> |
Junio C Hamano | a574a09 | 2010-06-13 19:57:10 | [diff] [blame] | 3706 | format.pretty |
| 3707 | </dt> |
| 3708 | <dd> |
| 3709 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3710 | Default for the <code>--format</code> option. (See "PRETTY FORMATS" above.) |
Junio C Hamano | a574a09 | 2010-06-13 19:57:10 | [diff] [blame] | 3711 | Defaults to "medium". |
| 3712 | </p> |
| 3713 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3714 | <dt class="hdlist1"> |
Junio C Hamano | a574a09 | 2010-06-13 19:57:10 | [diff] [blame] | 3715 | i18n.logOutputEncoding |
| 3716 | </dt> |
| 3717 | <dd> |
| 3718 | <p> |
| 3719 | Encoding to use when displaying logs. (See "Discussion", above.) |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3720 | Defaults to the value of <code>i18n.commitEncoding</code> if set, UTF-8 |
Junio C Hamano | a574a09 | 2010-06-13 19:57:10 | [diff] [blame] | 3721 | otherwise. |
| 3722 | </p> |
| 3723 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3724 | <dt class="hdlist1"> |
Junio C Hamano | a574a09 | 2010-06-13 19:57:10 | [diff] [blame] | 3725 | log.date |
| 3726 | </dt> |
| 3727 | <dd> |
| 3728 | <p> |
| 3729 | Default format for human-readable dates. (Compare the |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3730 | <code>--date</code> option.) Defaults to "default", which means to write |
| 3731 | dates like <code>Sat May 8 19:35:34 2010 -0500</code>. |
Junio C Hamano | a574a09 | 2010-06-13 19:57:10 | [diff] [blame] | 3732 | </p> |
| 3733 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3734 | <dt class="hdlist1"> |
Junio C Hamano | a574a09 | 2010-06-13 19:57:10 | [diff] [blame] | 3735 | log.showroot |
| 3736 | </dt> |
| 3737 | <dd> |
| 3738 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3739 | If <code>false</code>, <em>git log</em> and related commands will not treat the |
Junio C Hamano | a574a09 | 2010-06-13 19:57:10 | [diff] [blame] | 3740 | initial commit as a big creation event. Any root commits in |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3741 | <code>git log -p</code> output would be shown without a diff attached. |
| 3742 | The default is <code>true</code>. |
Junio C Hamano | a574a09 | 2010-06-13 19:57:10 | [diff] [blame] | 3743 | </p> |
| 3744 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3745 | <dt class="hdlist1"> |
Junio C Hamano | abad6da | 2013-01-06 09:06:32 | [diff] [blame] | 3746 | mailmap.* |
Junio C Hamano | a574a09 | 2010-06-13 19:57:10 | [diff] [blame] | 3747 | </dt> |
| 3748 | <dd> |
| 3749 | <p> |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 3750 | See <a href="git-shortlog.html">git-shortlog(1)</a>. |
Junio C Hamano | a574a09 | 2010-06-13 19:57:10 | [diff] [blame] | 3751 | </p> |
| 3752 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3753 | <dt class="hdlist1"> |
Junio C Hamano | a574a09 | 2010-06-13 19:57:10 | [diff] [blame] | 3754 | notes.displayRef |
| 3755 | </dt> |
| 3756 | <dd> |
| 3757 | <p> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3758 | Which refs, in addition to the default set by <code>core.notesRef</code> |
Junio C Hamano | a574a09 | 2010-06-13 19:57:10 | [diff] [blame] | 3759 | or <em>GIT_NOTES_REF</em>, to read notes from when showing commit |
| 3760 | messages with the <em>log</em> family of commands. See |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 3761 | <a href="git-notes.html">git-notes(1)</a>. |
Junio C Hamano | a574a09 | 2010-06-13 19:57:10 | [diff] [blame] | 3762 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 3763 | <div class="paragraph"><p>May be an unabbreviated ref name or a glob and may be specified |
Junio C Hamano | a574a09 | 2010-06-13 19:57:10 | [diff] [blame] | 3764 | multiple times. A warning will be issued for refs that do not exist, |
| 3765 | but a glob that does not match any refs is silently ignored.</p></div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3766 | <div class="paragraph"><p>This setting can be disabled by the <code>--no-notes</code> option, |
Junio C Hamano | a574a09 | 2010-06-13 19:57:10 | [diff] [blame] | 3767 | overridden by the <em>GIT_NOTES_DISPLAY_REF</em> environment variable, |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3768 | and overridden by the <code>--notes=<ref></code> option.</p></div> |
Junio C Hamano | a574a09 | 2010-06-13 19:57:10 | [diff] [blame] | 3769 | </dd> |
| 3770 | </dl></div> |
| 3771 | </div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3772 | </div> |
| 3773 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 3774 | <h2 id="_git">GIT</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 3775 | <div class="sectionbody"> |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 3776 | <div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 3777 | </div> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 3778 | </div> |
Junio C Hamano | 9629d4f | 2012-12-19 00:28:27 | [diff] [blame] | 3779 | </div> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 3780 | <div id="footnotes"><hr /></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 3781 | <div id="footer"> |
| 3782 | <div id="footer-text"> |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 3783 | Last updated 2013-02-05 21:07:26 PST |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 3784 | </div> |
| 3785 | </div> |
| 3786 | </body> |
| 3787 | </html> |