Skip to content

Commit fd5c74e

Browse files
phil-blaingitster
authored andcommitted
doc: line-range: improve formatting
Improve the formatting of the description of the line-range option '-L' for `git log`, `gitk` and `git blame`: - Use bold for <start>, <end> and <funcname> - Use backticks for literals Signed-off-by: Philippe Blain <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f9c8d8c commit fd5c74e

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

Documentation/blame-options.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
Annotate only the given line range. May be specified multiple times.
1515
Overlapping ranges are allowed.
1616
+
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>.
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>'.
1919
+
2020
include::line-range-format.txt[]
2121

Documentation/line-range-format.txt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
<start> and <end> can take one of these forms:
1+
'<start>' and '<end>' can take one of these forms:
22

33
- number
44
+
5-
If <start> or <end> is a number, it specifies an
5+
If '<start>' or '<end>' is a number, it specifies an
66
absolute line number (lines count from 1).
77
+
88

9-
- /regex/
9+
- `/regex/`
1010
+
1111
This form will use the first line matching the given
12-
POSIX regex. If <start> is a regex, it will search from the end of
12+
POSIX regex. If '<start>' is a regex, it will search from the end of
1313
the previous `-L` range, if any, otherwise from the start of file.
14-
If <start> is ``^/regex/'', it will search from the start of file.
15-
If <end> is a regex, it will search
16-
starting at the line given by <start>.
14+
If '<start>' is `^/regex/`, it will search from the start of file.
15+
If '<end>' is a regex, it will search
16+
starting at the line given by '<start>'.
1717
+
1818

1919
- +offset or -offset
2020
+
21-
This is only valid for <end> and will specify a number
22-
of lines before or after the line given by <start>.
21+
This is only valid for '<end>' and will specify a number
22+
of lines before or after the line given by '<start>'.
2323

2424
+
25-
If ``:<funcname>'' is given in place of <start> and <end>, it is a
25+
If `:<funcname>` is given in place of '<start>' and '<end>', it is a
2626
regular expression that denotes the range from the first funcname line
27-
that matches <funcname>, up to the next funcname line. ``:<funcname>''
27+
that matches '<funcname>', up to the next funcname line. `:<funcname>`
2828
searches from the end of the previous `-L` range, if any, otherwise
29-
from the start of file. ``^:<funcname>'' searches from the start of
29+
from the start of file. `^:<funcname>` searches from the start of
3030
file.

Documentation/line-range-options.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
-L<start>,<end>:<file>::
22
-L:<funcname>:<file>::
33

4-
Trace the evolution of the line range given by "<start>,<end>"
5-
(or the function name regex <funcname>) within the <file>. You may
4+
Trace the evolution of the line range given by '<start>,<end>'
5+
(or the function name regex '<funcname>') within the '<file>'. You may
66
not give any pathspec limiters. This is currently limited to
77
a walk starting from a single revision, i.e., you may only
88
give zero or one positive revision arguments, and
9-
<start> and <end> (or <funcname>) must exist in the starting revision.
9+
'<start>' and '<end>' (or '<funcname>') must exist in the starting revision.
1010
You can specify this option more than once. Implies `--patch`.
1111
Patch output can be suppressed using `--no-patch`, but other diff formats
1212
(namely `--raw`, `--numstat`, `--shortstat`, `--dirstat`, `--summary`,

0 commit comments

Comments
 (0)