]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/blame-options.txt
Post 2.3 cycle (batch #9)
[thirdparty/git.git] / Documentation / blame-options.txt
CommitLineData
635f4a30
AR
1-b::
2 Show blank SHA-1 for boundary commits. This can also
3 be controlled via the `blame.blankboundary` config option.
4
5--root::
6 Do not treat root commits as boundaries. This can also be
7 controlled via the `blame.showroot` config option.
8
9--show-stats::
10 Include additional statistics at the end of blame output.
11
e6d2b9f6
ES
12-L <start>,<end>::
13-L :<regex>::
5bd9b79a
ES
14 Annotate only the given line range. May be specified multiple times.
15 Overlapping ranges are allowed.
16+
17<start> and <end> are optional. ``-L <start>'' or ``-L <start>,'' spans from
18<start> to end of file. ``-L ,<end>'' spans from start of file to <end>.
df83d5cf 19+
25ed3412 20include::line-range-format.txt[]
635f4a30
AR
21
22-l::
23 Show long rev (Default: off).
24
25-t::
26 Show raw timestamp (Default: off).
27
28-S <revs-file>::
b89510f0 29 Use revisions from revs-file instead of calling linkgit:git-rev-list[1].
635f4a30 30
b452cc16
MM
31--reverse::
32 Walk history forward instead of backward. Instead of showing
33 the revision in which a line appeared, this shows the last
34 revision in which a line has existed. This requires a range of
35 revision like START..END where the path to blame exists in
36 START.
37
3240240f
SB
38-p::
39--porcelain::
635f4a30
AR
40 Show in a format designed for machine consumption.
41
ed747dd5
JK
42--line-porcelain::
43 Show the porcelain format, but output commit information for
44 each line, not just the first time a commit is referenced.
45 Implies --porcelain.
46
635f4a30
AR
47--incremental::
48 Show the result incrementally in a format designed for
49 machine consumption.
50
69cd8f63
AG
51--encoding=<encoding>::
52 Specifies the encoding used to output author names
53 and commit summaries. Setting it to `none` makes blame
54 output unconverted data. For more information see the
55 discussion about encoding in the linkgit:git-log[1]
56 manual page.
57
635f4a30
AR
58--contents <file>::
59 When <rev> is not specified, the command annotates the
60 changes starting backwards from the working tree copy.
61 This flag makes the command pretend as if the working
52727068 62 tree copy has the contents of the named file (specify
635f4a30
AR
63 `-` to make the command read from the standard input).
64
31653c1a
EL
65--date <format>::
66 The value is one of the following alternatives:
67 {relative,local,default,iso,rfc,short}. If --date is not
68 provided, the value of the blame.date config variable is
69 used. If the blame.date config variable is also not set, the
70 iso format is used. For more information, See the discussion
71 of the --date option at linkgit:git-log[1].
72
635f4a30 73-M|<num>|::
d8c416b2
JH
74 Detect moved or copied lines within a file. When a commit
75 moves or copies a block of lines (e.g. the original file
76 has A and then B, and the commit changes it to B and then
77 A), the traditional 'blame' algorithm notices only half of
78 the movement and typically blames the lines that were moved
79 up (i.e. B) to the parent and assigns blame to the lines that
80 were moved down (i.e. A) to the child commit. With this
81 option, both groups of lines are blamed on the parent by
82 running extra passes of inspection.
3955d994
JH
83+
84<num> is optional but it is the lower bound on the number of
2de9b711 85alphanumeric characters that Git must detect as moving/copying
3955d994 86within a file for it to associate those lines with the parent
509de65f 87commit. The default value is 20.
635f4a30
AR
88
89-C|<num>|::
d8c416b2 90 In addition to `-M`, detect lines moved or copied from other
635f4a30
AR
91 files that were modified in the same commit. This is
92 useful when you reorganize your program and move code
93 around across files. When this option is given twice,
88d50e78
RR
94 the command additionally looks for copies from other
95 files in the commit that creates the file. When this
96 option is given three times, the command additionally
97 looks for copies from other files in any commit.
3955d994
JH
98+
99<num> is optional but it is the lower bound on the number of
2de9b711 100alphanumeric characters that Git must detect as moving/copying
3955d994 101between files for it to associate those lines with the parent
509de65f
BY
102commit. And the default value is 40. If there are more than one
103`-C` options given, the <num> argument of the last `-C` will
104take effect.
635f4a30 105
3240240f 106-h::
635f4a30 107 Show help message.