]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/blame-options.txt
Merge branch 'ea/blame-use-oideq'
[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
da0005b8 7 controlled via the `blame.showRoot` config option.
635f4a30
AR
8
9--show-stats::
10 Include additional statistics at the end of blame output.
11
e6d2b9f6 12-L <start>,<end>::
d349e0ee 13-L :<funcname>::
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
e1d09701 31--reverse <rev>..<rev>::
b452cc16
MM
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
e1d09701
JH
36 START. `git blame --reverse START` is taken as `git blame
37 --reverse START..HEAD` for convenience.
b452cc16 38
11bc12ae
RP
39--first-parent::
40 Follow only the first parent commit upon seeing a merge
41 commit. This option can be used to determine when a line
42 was introduced to a particular integration branch, rather
43 than when it was introduced to the history overall.
44
3240240f
SB
45-p::
46--porcelain::
635f4a30
AR
47 Show in a format designed for machine consumption.
48
ed747dd5
JK
49--line-porcelain::
50 Show the porcelain format, but output commit information for
51 each line, not just the first time a commit is referenced.
52 Implies --porcelain.
53
635f4a30
AR
54--incremental::
55 Show the result incrementally in a format designed for
56 machine consumption.
57
69cd8f63
AG
58--encoding=<encoding>::
59 Specifies the encoding used to output author names
60 and commit summaries. Setting it to `none` makes blame
61 output unconverted data. For more information see the
62 discussion about encoding in the linkgit:git-log[1]
63 manual page.
64
635f4a30
AR
65--contents <file>::
66 When <rev> is not specified, the command annotates the
67 changes starting backwards from the working tree copy.
68 This flag makes the command pretend as if the working
52727068 69 tree copy has the contents of the named file (specify
635f4a30
AR
70 `-` to make the command read from the standard input).
71
31653c1a 72--date <format>::
2df4e29c 73 Specifies the format used to output dates. If --date is not
31653c1a
EL
74 provided, the value of the blame.date config variable is
75 used. If the blame.date config variable is also not set, the
2df4e29c 76 iso format is used. For supported values, see the discussion
31653c1a
EL
77 of the --date option at linkgit:git-log[1].
78
aba37f49
ECA
79--[no-]progress::
80 Progress status is reported on the standard error stream
81 by default when it is attached to a terminal. This flag
82 enables progress reporting even if not attached to a
83 terminal. Can't use `--progress` together with `--porcelain`
84 or `--incremental`.
85
2b35a9f4 86-M[<num>]::
d8c416b2
JH
87 Detect moved or copied lines within a file. When a commit
88 moves or copies a block of lines (e.g. the original file
89 has A and then B, and the commit changes it to B and then
90 A), the traditional 'blame' algorithm notices only half of
91 the movement and typically blames the lines that were moved
92 up (i.e. B) to the parent and assigns blame to the lines that
93 were moved down (i.e. A) to the child commit. With this
94 option, both groups of lines are blamed on the parent by
95 running extra passes of inspection.
3955d994
JH
96+
97<num> is optional but it is the lower bound on the number of
2de9b711 98alphanumeric characters that Git must detect as moving/copying
3955d994 99within a file for it to associate those lines with the parent
509de65f 100commit. The default value is 20.
635f4a30 101
2b35a9f4 102-C[<num>]::
d8c416b2 103 In addition to `-M`, detect lines moved or copied from other
635f4a30
AR
104 files that were modified in the same commit. This is
105 useful when you reorganize your program and move code
106 around across files. When this option is given twice,
88d50e78
RR
107 the command additionally looks for copies from other
108 files in the commit that creates the file. When this
109 option is given three times, the command additionally
110 looks for copies from other files in any commit.
3955d994
JH
111+
112<num> is optional but it is the lower bound on the number of
2de9b711 113alphanumeric characters that Git must detect as moving/copying
3955d994 114between files for it to associate those lines with the parent
509de65f
BY
115commit. And the default value is 40. If there are more than one
116`-C` options given, the <num> argument of the last `-C` will
117take effect.
635f4a30 118
ae3f36de
BR
119--ignore-rev <rev>::
120 Ignore changes made by the revision when assigning blame, as if the
121 change never happened. Lines that were changed or added by an ignored
122 commit will be blamed on the previous commit that changed that line or
123 nearby lines. This option may be specified multiple times to ignore
8934ac8c
BR
124 more than one revision. If the `blame.markIgnoredLines` config option
125 is set, then lines that were changed by an ignored commit and attributed to
126 another commit will be marked with a `?` in the blame output. If the
127 `blame.markUnblamableLines` config option is set, then those lines touched
128 by an ignored commit that we could not attribute to another revision are
129 marked with a '*'.
ae3f36de
BR
130
131--ignore-revs-file <file>::
132 Ignore revisions listed in `file`, which must be in the same format as an
133 `fsck.skipList`. This option may be repeated, and these files will be
134 processed after any files specified with the `blame.ignoreRevsFile` config
135 option. An empty file name, `""`, will clear the list of revs from
136 previously processed files.
137
3240240f 138-h::
635f4a30 139 Show help message.