Updated git_doc to git 1.8
[TortoiseGit.git] / doc / source / en / TortoiseGit / git_doc / git-annotate.xml
blob2d9a54631c04fe1267a77992af89cc237e70698a
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <!DOCTYPE sect2 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">\r
3 \r
4 <sect2 lang="en" id="git-annotate(1)">\r
5     <title>git-annotate(1)</title>\r
6 <indexterm>\r
7 <primary>git-annotate(1)</primary>\r
8 </indexterm>\r
9 <simplesect id="git-annotate(1)__name">\r
10 <title>NAME</title>\r
11 <simpara>git-annotate - Annotate file lines with commit information</simpara>\r
12 </simplesect>\r
13 <simplesect id="git-annotate(1)__synopsis">\r
14 <title>SYNOPSIS</title>\r
15 <blockquote>\r
16 <literallayout><emphasis>git annotate</emphasis> [options] file [revision]</literallayout>\r
17 </blockquote>\r
18 </simplesect>\r
19 <simplesect id="git-annotate(1)__description">\r
20 <title>DESCRIPTION</title>\r
21 <simpara>Annotates each line in the given file with information from the commit\r
22 which introduced the line. Optionally annotates from a given revision.</simpara>\r
23 <simpara>The only difference between this command and <xref linkend="git-blame(1)" /> is that\r
24 they use slightly different output formats, and this command exists only\r
25 for backward compatibility to support existing scripts, and provide a more\r
26 familiar command name for people coming from other SCM systems.</simpara>\r
27 </simplesect>\r
28 <simplesect id="git-annotate(1)__options">\r
29 <title>OPTIONS</title>\r
30 <variablelist>\r
31 <varlistentry>\r
32 <term>\r
33 -b\r
34 </term>\r
35 <listitem>\r
36 <simpara>\r
37         Show blank SHA-1 for boundary commits.  This can also\r
38         be controlled via the <emphasis>blame.blankboundary</emphasis> config option.\r
39 </simpara>\r
40 </listitem>\r
41 </varlistentry>\r
42 <varlistentry>\r
43 <term>\r
44 --root\r
45 </term>\r
46 <listitem>\r
47 <simpara>\r
48         Do not treat root commits as boundaries.  This can also be\r
49         controlled via the <emphasis>blame.showroot</emphasis> config option.\r
50 </simpara>\r
51 </listitem>\r
52 </varlistentry>\r
53 <varlistentry>\r
54 <term>\r
55 --show-stats\r
56 </term>\r
57 <listitem>\r
58 <simpara>\r
59         Include additional statistics at the end of blame output.\r
60 </simpara>\r
61 </listitem>\r
62 </varlistentry>\r
63 <varlistentry>\r
64 <term>\r
65 -L &lt;start&gt;,&lt;end&gt;\r
66 </term>\r
67 <listitem>\r
68 <simpara>\r
69         Annotate only the given line range.  &lt;start&gt; and &lt;end&gt; can take\r
70         one of these forms:\r
71 </simpara>\r
72 <itemizedlist>\r
73 <listitem>\r
74 <simpara>\r
75 number\r
76 </simpara>\r
77 <simpara>If &lt;start&gt; or &lt;end&gt; is a number, it specifies an\r
78 absolute line number (lines count from 1).</simpara>\r
79 </listitem>\r
80 <listitem>\r
81 <simpara>\r
82 /regex/\r
83 </simpara>\r
84 <simpara>This form will use the first line matching the given\r
85 POSIX regex.  If &lt;end&gt; is a regex, it will search\r
86 starting at the line given by &lt;start&gt;.</simpara>\r
87 </listitem>\r
88 <listitem>\r
89 <simpara>\r
90 +offset or -offset\r
91 </simpara>\r
92 <simpara>This is only valid for &lt;end&gt; and will specify a number\r
93 of lines before or after the line given by &lt;start&gt;.</simpara>\r
94 </listitem>\r
95 </itemizedlist>\r
96 </listitem>\r
97 </varlistentry>\r
98 <varlistentry>\r
99 <term>\r
100 -l\r
101 </term>\r
102 <listitem>\r
103 <simpara>\r
104         Show long rev (Default: off).\r
105 </simpara>\r
106 </listitem>\r
107 </varlistentry>\r
108 <varlistentry>\r
109 <term>\r
110 -t\r
111 </term>\r
112 <listitem>\r
113 <simpara>\r
114         Show raw timestamp (Default: off).\r
115 </simpara>\r
116 </listitem>\r
117 </varlistentry>\r
118 <varlistentry>\r
119 <term>\r
120 -S &lt;revs-file&gt;\r
121 </term>\r
122 <listitem>\r
123 <simpara>\r
124         Use revisions from revs-file instead of calling <xref linkend="git-rev-list(1)" />.\r
125 </simpara>\r
126 </listitem>\r
127 </varlistentry>\r
128 <varlistentry>\r
129 <term>\r
130 --reverse\r
131 </term>\r
132 <listitem>\r
133 <simpara>\r
134         Walk history forward instead of backward. Instead of showing\r
135         the revision in which a line appeared, this shows the last\r
136         revision in which a line has existed. This requires a range of\r
137         revision like START..END where the path to blame exists in\r
138         START.\r
139 </simpara>\r
140 </listitem>\r
141 </varlistentry>\r
142 <varlistentry>\r
143 <term>\r
144 -p\r
145 </term>\r
146 <term>\r
147 --porcelain\r
148 </term>\r
149 <listitem>\r
150 <simpara>\r
151         Show in a format designed for machine consumption.\r
152 </simpara>\r
153 </listitem>\r
154 </varlistentry>\r
155 <varlistentry>\r
156 <term>\r
157 --line-porcelain\r
158 </term>\r
159 <listitem>\r
160 <simpara>\r
161         Show the porcelain format, but output commit information for\r
162         each line, not just the first time a commit is referenced.\r
163         Implies --porcelain.\r
164 </simpara>\r
165 </listitem>\r
166 </varlistentry>\r
167 <varlistentry>\r
168 <term>\r
169 --incremental\r
170 </term>\r
171 <listitem>\r
172 <simpara>\r
173         Show the result incrementally in a format designed for\r
174         machine consumption.\r
175 </simpara>\r
176 </listitem>\r
177 </varlistentry>\r
178 <varlistentry>\r
179 <term>\r
180 --encoding=&lt;encoding&gt;\r
181 </term>\r
182 <listitem>\r
183 <simpara>\r
184         Specifies the encoding used to output author names\r
185         and commit summaries. Setting it to <emphasis>none</emphasis> makes blame\r
186         output unconverted data. For more information see the\r
187         discussion about encoding in the <xref linkend="git-log(1)" />\r
188         manual page.\r
189 </simpara>\r
190 </listitem>\r
191 </varlistentry>\r
192 <varlistentry>\r
193 <term>\r
194 --contents &lt;file&gt;\r
195 </term>\r
196 <listitem>\r
197 <simpara>\r
198         When &lt;rev&gt; is not specified, the command annotates the\r
199         changes starting backwards from the working tree copy.\r
200         This flag makes the command pretend as if the working\r
201         tree copy has the contents of the named file (specify\r
202         <emphasis>-</emphasis> to make the command read from the standard input).\r
203 </simpara>\r
204 </listitem>\r
205 </varlistentry>\r
206 <varlistentry>\r
207 <term>\r
208 --date &lt;format&gt;\r
209 </term>\r
210 <listitem>\r
211 <simpara>\r
212         The value is one of the following alternatives:\r
213         {relative,local,default,iso,rfc,short}. If --date is not\r
214         provided, the value of the blame.date config variable is\r
215         used. If the blame.date config variable is also not set, the\r
216         iso format is used. For more information, See the discussion\r
217         of the --date option at <xref linkend="git-log(1)" />.\r
218 </simpara>\r
219 </listitem>\r
220 </varlistentry>\r
221 <varlistentry>\r
222 <term>\r
223 -M|&lt;num&gt;|\r
224 </term>\r
225 <listitem>\r
226 <simpara>\r
227         Detect moved or copied lines within a file. When a commit\r
228         moves or copies a block of lines (e.g. the original file\r
229         has A and then B, and the commit changes it to B and then\r
230         A), the traditional <emphasis>blame</emphasis> algorithm notices only half of\r
231         the movement and typically blames the lines that were moved\r
232         up (i.e. B) to the parent and assigns blame to the lines that\r
233         were moved down (i.e. A) to the child commit.  With this\r
234         option, both groups of lines are blamed on the parent by\r
235         running extra passes of inspection.\r
236 </simpara>\r
237 <simpara>&lt;num&gt; is optional but it is the lower bound on the number of\r
238 alphanumeric characters that git must detect as moving/copying\r
239 within a file for it to associate those lines with the parent\r
240 commit. The default value is 20.</simpara>\r
241 </listitem>\r
242 </varlistentry>\r
243 <varlistentry>\r
244 <term>\r
245 -C|&lt;num&gt;|\r
246 </term>\r
247 <listitem>\r
248 <simpara>\r
249         In addition to <emphasis>-M</emphasis>, detect lines moved or copied from other\r
250         files that were modified in the same commit.  This is\r
251         useful when you reorganize your program and move code\r
252         around across files.  When this option is given twice,\r
253         the command additionally looks for copies from other\r
254         files in the commit that creates the file. When this\r
255         option is given three times, the command additionally\r
256         looks for copies from other files in any commit.\r
257 </simpara>\r
258 <simpara>&lt;num&gt; is optional but it is the lower bound on the number of\r
259 alphanumeric characters that git must detect as moving/copying\r
260 between files for it to associate those lines with the parent\r
261 commit. And the default value is 40. If there are more than one\r
262 <emphasis>-C</emphasis> options given, the &lt;num&gt; argument of the last <emphasis>-C</emphasis> will\r
263 take effect.</simpara>\r
264 </listitem>\r
265 </varlistentry>\r
266 <varlistentry>\r
267 <term>\r
268 -h\r
269 </term>\r
270 <listitem>\r
271 <simpara>\r
272         Show help message.\r
273 </simpara>\r
274 </listitem>\r
275 </varlistentry>\r
276 </variablelist>\r
277 </simplesect>\r
278 <simplesect id="git-annotate(1)__see_also">\r
279 <title>SEE ALSO</title>\r
280 <simpara><xref linkend="git-blame(1)" /></simpara>\r
281 </simplesect>\r
282 <simplesect id="git-annotate(1)__git">\r
283 <title>GIT</title>\r
284 <simpara>Part of the <xref linkend="git(1)" /> suite</simpara>\r
285 </simplesect>\r
286 </sect2>\r