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