make some more strings translatable
[TortoiseGit.git] / doc / source / en / TortoiseGit / git_doc / git-whatchanged.html.xml
blobe1ceeda3aeb92138f7f00704dd10d4b0e2d91ceb
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">\r
3 \r
4 <article lang="en" id="git-whatchanged(1)">\r
5 <articleinfo>\r
6     <title>git-whatchanged(1)</title>\r
7         <indexterm>\r
8                 <primary>git-whatchanged(1)</primary>\r
9         </indexterm>\r
10 </articleinfo>\r
11 <simplesect id="_name">\r
12 <title>NAME</title>\r
13 <simpara>git-whatchanged - Show logs with difference each commit introduces</simpara>\r
14 </simplesect>\r
15 <simplesect id="_synopsis">\r
16 <title>SYNOPSIS</title>\r
17 <simpara><emphasis>git whatchanged</emphasis> &lt;option&gt;&#8230;</simpara>\r
18 </simplesect>\r
19 <simplesect id="_description">\r
20 <title>DESCRIPTION</title>\r
21 <simpara>Shows commit logs and diff output each commit introduces.  The\r
22 command internally invokes <emphasis>git-rev-list</emphasis> piped to\r
23 <emphasis>git-diff-tree</emphasis>, and takes command line options for both of\r
24 these commands.</simpara>\r
25 <simpara>This manual page describes only the most frequently used options.</simpara>\r
26 </simplesect>\r
27 <simplesect id="_options">\r
28 <title>OPTIONS</title>\r
29 <variablelist>\r
30 <varlistentry>\r
31 <term>\r
32 -p\r
33 </term>\r
34 <listitem>\r
35 <simpara>\r
36         Show textual diffs, instead of the git internal diff\r
37         output format that is useful only to tell the changed\r
38         paths and their nature of changes.\r
39 </simpara>\r
40 </listitem>\r
41 </varlistentry>\r
42 <varlistentry>\r
43 <term>\r
44 -&lt;n&gt;\r
45 </term>\r
46 <listitem>\r
47 <simpara>\r
48         Limit output to &lt;n&gt; commits.\r
49 </simpara>\r
50 </listitem>\r
51 </varlistentry>\r
52 <varlistentry>\r
53 <term>\r
54 &lt;since&gt;..&lt;until&gt;\r
55 </term>\r
56 <listitem>\r
57 <simpara>\r
58         Limit output to between the two named commits (bottom\r
59         exclusive, top inclusive).\r
60 </simpara>\r
61 </listitem>\r
62 </varlistentry>\r
63 <varlistentry>\r
64 <term>\r
65 -r\r
66 </term>\r
67 <listitem>\r
68 <simpara>\r
69         Show git internal diff output, but for the whole tree,\r
70         not just the top level.\r
71 </simpara>\r
72 </listitem>\r
73 </varlistentry>\r
74 <varlistentry>\r
75 <term>\r
76 -m\r
77 </term>\r
78 <listitem>\r
79 <simpara>\r
80         By default, differences for merge commits are not shown.\r
81         With this flag, show differences to that commit from all\r
82         of its parents.\r
83 </simpara>\r
84 <simpara>However, it is not very useful in general, although it\r
85 <emphasis role="strong">is</emphasis> useful on a file-by-file basis.</simpara>\r
86 </listitem>\r
87 </varlistentry>\r
88 <varlistentry>\r
89 <term>\r
90 --pretty[=<emphasis>&lt;format&gt;</emphasis>]\r
91 </term>\r
92 <listitem>\r
93 <simpara>\r
94         Pretty-print the contents of the commit logs in a given format,\r
95         where <emphasis>&lt;format&gt;</emphasis> can be one of <emphasis>oneline</emphasis>, <emphasis>short</emphasis>, <emphasis>medium</emphasis>,\r
96         <emphasis>full</emphasis>, <emphasis>fuller</emphasis>, <emphasis>email</emphasis>, <emphasis>raw</emphasis> and <emphasis>format:&lt;string&gt;</emphasis>.\r
97         When omitted, the format defaults to <emphasis>medium</emphasis>.\r
98 </simpara>\r
99 <simpara>Note: you can specify the default pretty format in the repository\r
100 configuration (see <xref linkend="git-config(1)"/>).</simpara>\r
101 </listitem>\r
102 </varlistentry>\r
103 <varlistentry>\r
104 <term>\r
105 --abbrev-commit\r
106 </term>\r
107 <listitem>\r
108 <simpara>\r
109         Instead of showing the full 40-byte hexadecimal commit object\r
110         name, show only a partial prefix.  Non default number of\r
111         digits can be specified with "--abbrev=&lt;n&gt;" (which also modifies\r
112         diff output, if it is displayed).\r
113 </simpara>\r
114 <simpara>This should make "--pretty=oneline" a whole lot more readable for\r
115 people using 80-column terminals.</simpara>\r
116 </listitem>\r
117 </varlistentry>\r
118 <varlistentry>\r
119 <term>\r
120 --encoding[=&lt;encoding&gt;]\r
121 </term>\r
122 <listitem>\r
123 <simpara>\r
124         The commit objects record the encoding used for the log message\r
125         in their encoding header; this option can be used to tell the\r
126         command to re-code the commit log message in the encoding\r
127         preferred by the user.  For non plumbing commands this\r
128         defaults to UTF-8.\r
129 </simpara>\r
130 </listitem>\r
131 </varlistentry>\r
132 </variablelist>\r
133 </simplesect>\r
134 <simplesect id="_pretty_formats">\r
135 <title>PRETTY FORMATS</title>\r
136 <simpara>If the commit is a merge, and if the pretty-format\r
137 is not <emphasis>oneline</emphasis>, <emphasis>email</emphasis> or <emphasis>raw</emphasis>, an additional line is\r
138 inserted before the <emphasis>Author:</emphasis> line.  This line begins with\r
139 "Merge: " and the sha1s of ancestral commits are printed,\r
140 separated by spaces.  Note that the listed commits may not\r
141 necessarily be the list of the <emphasis role="strong">direct</emphasis> parent commits if you\r
142 have limited your view of history: for example, if you are\r
143 only interested in changes related to a certain directory or\r
144 file.</simpara>\r
145 <simpara>Here are some additional details for each format:</simpara>\r
146 <itemizedlist>\r
147 <listitem>\r
148 <simpara>\r
149 <emphasis>oneline</emphasis>\r
150 </simpara>\r
151 <literallayout class="monospaced">&lt;sha1&gt; &lt;title line&gt;</literallayout>\r
152 <simpara>This is designed to be as compact as possible.</simpara>\r
153 </listitem>\r
154 <listitem>\r
155 <simpara>\r
156 <emphasis>short</emphasis>\r
157 </simpara>\r
158 <literallayout class="monospaced">commit &lt;sha1&gt;\r
159 Author: &lt;author&gt;</literallayout>\r
160 <literallayout class="monospaced">&lt;title line&gt;</literallayout>\r
161 </listitem>\r
162 <listitem>\r
163 <simpara>\r
164 <emphasis>medium</emphasis>\r
165 </simpara>\r
166 <literallayout class="monospaced">commit &lt;sha1&gt;\r
167 Author: &lt;author&gt;\r
168 Date:   &lt;author date&gt;</literallayout>\r
169 <literallayout class="monospaced">&lt;title line&gt;</literallayout>\r
170 <literallayout class="monospaced">&lt;full commit message&gt;</literallayout>\r
171 </listitem>\r
172 <listitem>\r
173 <simpara>\r
174 <emphasis>full</emphasis>\r
175 </simpara>\r
176 <literallayout class="monospaced">commit &lt;sha1&gt;\r
177 Author: &lt;author&gt;\r
178 Commit: &lt;committer&gt;</literallayout>\r
179 <literallayout class="monospaced">&lt;title line&gt;</literallayout>\r
180 <literallayout class="monospaced">&lt;full commit message&gt;</literallayout>\r
181 </listitem>\r
182 <listitem>\r
183 <simpara>\r
184 <emphasis>fuller</emphasis>\r
185 </simpara>\r
186 <literallayout class="monospaced">commit &lt;sha1&gt;\r
187 Author:     &lt;author&gt;\r
188 AuthorDate: &lt;author date&gt;\r
189 Commit:     &lt;committer&gt;\r
190 CommitDate: &lt;committer date&gt;</literallayout>\r
191 <literallayout class="monospaced">&lt;title line&gt;</literallayout>\r
192 <literallayout class="monospaced">&lt;full commit message&gt;</literallayout>\r
193 </listitem>\r
194 <listitem>\r
195 <simpara>\r
196 <emphasis>email</emphasis>\r
197 </simpara>\r
198 <literallayout class="monospaced">From &lt;sha1&gt; &lt;date&gt;\r
199 From: &lt;author&gt;\r
200 Date: &lt;author date&gt;\r
201 Subject: [PATCH] &lt;title line&gt;</literallayout>\r
202 <literallayout class="monospaced">&lt;full commit message&gt;</literallayout>\r
203 </listitem>\r
204 <listitem>\r
205 <simpara>\r
206 <emphasis>raw</emphasis>\r
207 </simpara>\r
208 <simpara>The <emphasis>raw</emphasis> format shows the entire commit exactly as\r
209 stored in the commit object.  Notably, the SHA1s are\r
210 displayed in full, regardless of whether --abbrev or\r
211 --no-abbrev are used, and <emphasis>parents</emphasis> information show the\r
212 true parent commits, without taking grafts nor history\r
213 simplification into account.</simpara>\r
214 </listitem>\r
215 <listitem>\r
216 <simpara>\r
217 <emphasis>format:</emphasis>\r
218 </simpara>\r
219 <simpara>The <emphasis>format:</emphasis> format allows you to specify which information\r
220 you want to show. It works a little bit like printf format,\r
221 with the notable exception that you get a newline with <emphasis>%n</emphasis>\r
222 instead of <emphasis>\n</emphasis>.</simpara>\r
223 <simpara>E.g, <emphasis>format:"The author of %h was %an, %ar%nThe title was &gt;&gt;%s&lt;&lt;%n"</emphasis>\r
224 would show something like this:</simpara>\r
225 <literallayout>The author of fe6e0ee was Junio C Hamano, 23 hours ago\r
226 The title was &gt;&gt;t4119: test autocomputing -p&lt;n&gt; for traditional diff input.&lt;&lt;</literallayout>\r
227 <simpara>The placeholders are:</simpara>\r
228 <itemizedlist>\r
229 <listitem>\r
230 <simpara>\r
231 <emphasis>%H</emphasis>: commit hash\r
232 </simpara>\r
233 </listitem>\r
234 <listitem>\r
235 <simpara>\r
236 <emphasis>%h</emphasis>: abbreviated commit hash\r
237 </simpara>\r
238 </listitem>\r
239 <listitem>\r
240 <simpara>\r
241 <emphasis>%T</emphasis>: tree hash\r
242 </simpara>\r
243 </listitem>\r
244 <listitem>\r
245 <simpara>\r
246 <emphasis>%t</emphasis>: abbreviated tree hash\r
247 </simpara>\r
248 </listitem>\r
249 <listitem>\r
250 <simpara>\r
251 <emphasis>%P</emphasis>: parent hashes\r
252 </simpara>\r
253 </listitem>\r
254 <listitem>\r
255 <simpara>\r
256 <emphasis>%p</emphasis>: abbreviated parent hashes\r
257 </simpara>\r
258 </listitem>\r
259 <listitem>\r
260 <simpara>\r
261 <emphasis>%an</emphasis>: author name\r
262 </simpara>\r
263 </listitem>\r
264 <listitem>\r
265 <simpara>\r
266 <emphasis>%aN</emphasis>: author name (respecting .mailmap)\r
267 </simpara>\r
268 </listitem>\r
269 <listitem>\r
270 <simpara>\r
271 <emphasis>%ae</emphasis>: author email\r
272 </simpara>\r
273 </listitem>\r
274 <listitem>\r
275 <simpara>\r
276 <emphasis>%aE</emphasis>: author email (respecting .mailmap)\r
277 </simpara>\r
278 </listitem>\r
279 <listitem>\r
280 <simpara>\r
281 <emphasis>%ad</emphasis>: author date (format respects --date= option)\r
282 </simpara>\r
283 </listitem>\r
284 <listitem>\r
285 <simpara>\r
286 <emphasis>%aD</emphasis>: author date, RFC2822 style\r
287 </simpara>\r
288 </listitem>\r
289 <listitem>\r
290 <simpara>\r
291 <emphasis>%ar</emphasis>: author date, relative\r
292 </simpara>\r
293 </listitem>\r
294 <listitem>\r
295 <simpara>\r
296 <emphasis>%at</emphasis>: author date, UNIX timestamp\r
297 </simpara>\r
298 </listitem>\r
299 <listitem>\r
300 <simpara>\r
301 <emphasis>%ai</emphasis>: author date, ISO 8601 format\r
302 </simpara>\r
303 </listitem>\r
304 <listitem>\r
305 <simpara>\r
306 <emphasis>%cn</emphasis>: committer name\r
307 </simpara>\r
308 </listitem>\r
309 <listitem>\r
310 <simpara>\r
311 <emphasis>%cN</emphasis>: committer name (respecting .mailmap)\r
312 </simpara>\r
313 </listitem>\r
314 <listitem>\r
315 <simpara>\r
316 <emphasis>%ce</emphasis>: committer email\r
317 </simpara>\r
318 </listitem>\r
319 <listitem>\r
320 <simpara>\r
321 <emphasis>%cE</emphasis>: committer email (respecting .mailmap)\r
322 </simpara>\r
323 </listitem>\r
324 <listitem>\r
325 <simpara>\r
326 <emphasis>%cd</emphasis>: committer date\r
327 </simpara>\r
328 </listitem>\r
329 <listitem>\r
330 <simpara>\r
331 <emphasis>%cD</emphasis>: committer date, RFC2822 style\r
332 </simpara>\r
333 </listitem>\r
334 <listitem>\r
335 <simpara>\r
336 <emphasis>%cr</emphasis>: committer date, relative\r
337 </simpara>\r
338 </listitem>\r
339 <listitem>\r
340 <simpara>\r
341 <emphasis>%ct</emphasis>: committer date, UNIX timestamp\r
342 </simpara>\r
343 </listitem>\r
344 <listitem>\r
345 <simpara>\r
346 <emphasis>%ci</emphasis>: committer date, ISO 8601 format\r
347 </simpara>\r
348 </listitem>\r
349 <listitem>\r
350 <simpara>\r
351 <emphasis>%d</emphasis>: ref names, like the --decorate option of <xref linkend="git-log(1)"/>\r
352 </simpara>\r
353 </listitem>\r
354 <listitem>\r
355 <simpara>\r
356 <emphasis>%e</emphasis>: encoding\r
357 </simpara>\r
358 </listitem>\r
359 <listitem>\r
360 <simpara>\r
361 <emphasis>%s</emphasis>: subject\r
362 </simpara>\r
363 </listitem>\r
364 <listitem>\r
365 <simpara>\r
366 <emphasis>%b</emphasis>: body\r
367 </simpara>\r
368 </listitem>\r
369 <listitem>\r
370 <simpara>\r
371 <emphasis>%Cred</emphasis>: switch color to red\r
372 </simpara>\r
373 </listitem>\r
374 <listitem>\r
375 <simpara>\r
376 <emphasis>%Cgreen</emphasis>: switch color to green\r
377 </simpara>\r
378 </listitem>\r
379 <listitem>\r
380 <simpara>\r
381 <emphasis>%Cblue</emphasis>: switch color to blue\r
382 </simpara>\r
383 </listitem>\r
384 <listitem>\r
385 <simpara>\r
386 <emphasis>%Creset</emphasis>: reset color\r
387 </simpara>\r
388 </listitem>\r
389 <listitem>\r
390 <simpara>\r
391 <emphasis>%C(&#8230;)</emphasis>: color specification, as described in color.branch.* config option\r
392 </simpara>\r
393 </listitem>\r
394 <listitem>\r
395 <simpara>\r
396 <emphasis>%m</emphasis>: left, right or boundary mark\r
397 </simpara>\r
398 </listitem>\r
399 <listitem>\r
400 <simpara>\r
401 <emphasis>%n</emphasis>: newline\r
402 </simpara>\r
403 </listitem>\r
404 <listitem>\r
405 <simpara>\r
406 <emphasis>%x00</emphasis>: print a byte from a hex code\r
407 </simpara>\r
408 </listitem>\r
409 </itemizedlist>\r
410 </listitem>\r
411 <listitem>\r
412 <simpara>\r
413 <emphasis>tformat:</emphasis>\r
414 </simpara>\r
415 <simpara>The <emphasis>tformat:</emphasis> format works exactly like <emphasis>format:</emphasis>, except that it\r
416 provides "terminator" semantics instead of "separator" semantics. In\r
417 other words, each commit has the message terminator character (usually a\r
418 newline) appended, rather than a separator placed between entries.\r
419 This means that the final entry of a single-line format will be properly\r
420 terminated with a new line, just as the "oneline" format does.\r
421 For example:</simpara>\r
422 <literallayout>$ git log -2 --pretty=format:%h 4da45bef \\r
423   | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'\r
424 4da45be\r
425 7134973 -- NO NEWLINE\r
427 $ git log -2 --pretty=tformat:%h 4da45bef \\r
428   | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'\r
429 4da45be\r
430 7134973</literallayout>\r
431 </listitem>\r
432 </itemizedlist>\r
433 </simplesect>\r
434 <simplesect id="_examples">\r
435 <title>Examples</title>\r
436 <variablelist>\r
437 <varlistentry>\r
438 <term>\r
439 git whatchanged -p v2.6.12.. include/scsi drivers/scsi\r
440 </term>\r
441 <listitem>\r
442 <simpara>\r
443         Show as patches the commits since version <emphasis>v2.6.12</emphasis> that changed\r
444         any file in the include/scsi or drivers/scsi subdirectories\r
445 </simpara>\r
446 </listitem>\r
447 </varlistentry>\r
448 <varlistentry>\r
449 <term>\r
450 git whatchanged --since="2 weeks ago" -- gitk\r
451 </term>\r
452 <listitem>\r
453 <simpara>\r
454         Show the changes during the last two weeks to the file <emphasis>gitk</emphasis>.\r
455         The "--" is necessary to avoid confusion with the <emphasis role="strong">branch</emphasis> named\r
456         <emphasis>gitk</emphasis>\r
457 </simpara>\r
458 </listitem>\r
459 </varlistentry>\r
460 </variablelist>\r
461 </simplesect>\r
462 <simplesect id="_author">\r
463 <title>Author</title>\r
464 <simpara>Written by Linus Torvalds &lt;<ulink url="mailto:torvalds@osdl.org">torvalds@osdl.org</ulink>&gt; and\r
465 Junio C Hamano &lt;<ulink url="mailto:gitster@pobox.com">gitster@pobox.com</ulink>&gt;</simpara>\r
466 </simplesect>\r
467 <simplesect id="_documentation">\r
468 <title>Documentation</title>\r
469 <simpara>Documentation by David Greaves, Junio C Hamano and the git-list &lt;<ulink url="mailto:git@vger.kernel.org">git@vger.kernel.org</ulink>&gt;.</simpara>\r
470 </simplesect>\r
471 <simplesect id="_git">\r
472 <title>GIT</title>\r
473 <simpara>Part of the <xref linkend="git(1)"/> suite</simpara>\r
474 </simplesect>\r
475 </article>\r