]> git.ipfire.org Git - thirdparty/git.git/blob - Documentation/blame-options.txt
The seventh batch
[thirdparty/git.git] / Documentation / blame-options.txt
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
12 -L <start>,<end>::
13 -L :<funcname>::
14 Annotate only the line range given by '<start>,<end>',
15 or by the function name regex '<funcname>'.
16 May be specified multiple times. Overlapping ranges are allowed.
17 +
18 '<start>' and '<end>' are optional. `-L <start>` or `-L <start>,` spans from
19 '<start>' to end of file. `-L ,<end>` spans from start of file to '<end>'.
20 +
21 include::line-range-format.txt[]
22
23 -l::
24 Show long rev (Default: off).
25
26 -t::
27 Show raw timestamp (Default: off).
28
29 -S <revs-file>::
30 Use revisions from revs-file instead of calling linkgit:git-rev-list[1].
31
32 --reverse <rev>..<rev>::
33 Walk history forward instead of backward. Instead of showing
34 the revision in which a line appeared, this shows the last
35 revision in which a line has existed. This requires a range of
36 revision like START..END where the path to blame exists in
37 START. `git blame --reverse START` is taken as `git blame
38 --reverse START..HEAD` for convenience.
39
40 --first-parent::
41 Follow only the first parent commit upon seeing a merge
42 commit. This option can be used to determine when a line
43 was introduced to a particular integration branch, rather
44 than when it was introduced to the history overall.
45
46 -p::
47 --porcelain::
48 Show in a format designed for machine consumption.
49
50 --line-porcelain::
51 Show the porcelain format, but output commit information for
52 each line, not just the first time a commit is referenced.
53 Implies --porcelain.
54
55 --incremental::
56 Show the result incrementally in a format designed for
57 machine consumption.
58
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
66 --contents <file>::
67 Annotate using the contents from the named file, starting from <rev>
68 if it is specified, and HEAD otherwise. You may specify '-' to make
69 the command read from the standard input for the file contents.
70
71 --date <format>::
72 Specifies the format used to output dates. If --date is not
73 provided, the value of the blame.date config variable is
74 used. If the blame.date config variable is also not set, the
75 iso format is used. For supported values, see the discussion
76 of the --date option at linkgit:git-log[1].
77
78 --[no-]progress::
79 Progress status is reported on the standard error stream
80 by default when it is attached to a terminal. This flag
81 enables progress reporting even if not attached to a
82 terminal. Can't use `--progress` together with `--porcelain`
83 or `--incremental`.
84
85 -M[<num>]::
86 Detect moved or copied lines within a file. When a commit
87 moves or copies a block of lines (e.g. the original file
88 has A and then B, and the commit changes it to B and then
89 A), the traditional 'blame' algorithm notices only half of
90 the movement and typically blames the lines that were moved
91 up (i.e. B) to the parent and assigns blame to the lines that
92 were moved down (i.e. A) to the child commit. With this
93 option, both groups of lines are blamed on the parent by
94 running extra passes of inspection.
95 +
96 <num> is optional but it is the lower bound on the number of
97 alphanumeric characters that Git must detect as moving/copying
98 within a file for it to associate those lines with the parent
99 commit. The default value is 20.
100
101 -C[<num>]::
102 In addition to `-M`, detect lines moved or copied from other
103 files that were modified in the same commit. This is
104 useful when you reorganize your program and move code
105 around across files. When this option is given twice,
106 the command additionally looks for copies from other
107 files in the commit that creates the file. When this
108 option is given three times, the command additionally
109 looks for copies from other files in any commit.
110 +
111 <num> is optional but it is the lower bound on the number of
112 alphanumeric characters that Git must detect as moving/copying
113 between files for it to associate those lines with the parent
114 commit. And the default value is 40. If there are more than one
115 `-C` options given, the <num> argument of the last `-C` will
116 take effect.
117
118 --ignore-rev <rev>::
119 Ignore changes made by the revision when assigning blame, as if the
120 change never happened. Lines that were changed or added by an ignored
121 commit will be blamed on the previous commit that changed that line or
122 nearby lines. This option may be specified multiple times to ignore
123 more than one revision. If the `blame.markIgnoredLines` config option
124 is set, then lines that were changed by an ignored commit and attributed to
125 another commit will be marked with a `?` in the blame output. If the
126 `blame.markUnblamableLines` config option is set, then those lines touched
127 by an ignored commit that we could not attribute to another revision are
128 marked with a '*'.
129
130 --ignore-revs-file <file>::
131 Ignore revisions listed in `file`, which must be in the same format as an
132 `fsck.skipList`. This option may be repeated, and these files will be
133 processed after any files specified with the `blame.ignoreRevsFile` config
134 option. An empty file name, `""`, will clear the list of revs from
135 previously processed files.
136
137 --color-lines::
138 Color line annotations in the default format differently if they come from
139 the same commit as the preceding line. This makes it easier to distinguish
140 code blocks introduced by different commits. The color defaults to cyan and
141 can be adjusted using the `color.blame.repeatedLines` config option.
142
143 --color-by-age::
144 Color line annotations depending on the age of the line in the default format.
145 The `color.blame.highlightRecent` config option controls what color is used for
146 each range of age.
147
148 -h::
149 Show help message.