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