Skip to content

Commit 5bd9b79

Browse files
sunshinecogitster
authored andcommitted
blame: document multiple -L support
Signed-off-by: Eric Sunshine <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 91b5494 commit 5bd9b79

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

Documentation/blame-options.txt

+5-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111

1212
-L <start>,<end>::
1313
-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>.
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>.
1719
+
1820
include::line-range-format.txt[]
1921

Documentation/git-blame.txt

+7-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ SYNOPSIS
99
--------
1010
[verse]
1111
'git blame' [-c] [-b] [-l] [--root] [-t] [-f] [-n] [-s] [-e] [-p] [-w] [--incremental]
12-
[-L n,m | -L :fn] [-S <revs-file>] [-M] [-C] [-C] [-C] [--since=<date>]
12+
[-L <range>] [-S <revs-file>] [-M] [-C] [-C] [-C] [--since=<date>]
1313
[--abbrev=<n>] [<rev> | --contents <file> | --reverse <rev>] [--] <file>
1414

1515
DESCRIPTION
@@ -18,7 +18,8 @@ DESCRIPTION
1818
Annotates each line in the given file with information from the revision which
1919
last modified the line. Optionally, start annotating from the given revision.
2020

21-
The command can also limit the range of lines annotated.
21+
When specified one or more times, `-L` restricts annotation to the requested
22+
lines.
2223

2324
The origin of lines is automatically followed across whole-file
2425
renames (currently there is no option to turn the rename-following
@@ -130,7 +131,10 @@ SPECIFYING RANGES
130131

131132
Unlike 'git blame' and 'git annotate' in older versions of git, the extent
132133
of the annotation can be limited to both line ranges and revision
133-
ranges. When you are interested in finding the origin for
134+
ranges. The `-L` option, which limits annotation to a range of lines, may be
135+
specified multiple times.
136+
137+
When you are interested in finding the origin for
134138
lines 40-60 for file `foo`, you can use the `-L` option like so
135139
(they mean the same thing -- both ask for 21 lines starting at
136140
line 40):

0 commit comments

Comments
 (0)