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 <levraiphilippeblain@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Philippe Blain committed
Nov 1, 2020 at 17:28 UTC
fd5c74e7818a478fac66d821c38c4c2275c77da6
3 files changed
+17
-17
Documentation/blame-options.txt
+2
-2
@@ -14,8 +14,8 @@
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>.
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>'.
19
+
20
include::line-range-format.txt[]
21
Documentation/line-range-format.txt
+12
-12
@@ -1,30 +1,30 @@
1
-<start> and <end> can take one of these forms:
1
+'<start>' and '<end>' can take one of these forms:
2
3
- number
4
+
5
-If <start> or <end> is a number, it specifies an
5
+If '<start>' or '<end>' is a number, it specifies an
6
absolute line number (lines count from 1).
7
+
8
9
-- /regex/
9
+- `/regex/`
10
+
11
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
13
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>'.
17
+
18
19
- +offset or -offset
20
+
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>'.
23
24
+
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
26
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>`
28
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
30
file.
Documentation/line-range-options.txt
+3
-3
@@ -1,12 +1,12 @@
1
-L<start>,<end>:<file>::
2
-L:<funcname>:<file>::
3
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
6
not give any pathspec limiters. This is currently limited to
7
a walk starting from a single revision, i.e., you may only
8
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.
10
You can specify this option more than once. Implies `--patch`.
11
Patch output can be suppressed using `--no-patch`, but other diff formats
12
(namely `--raw`, `--numstat`, `--shortstat`, `--dirstat`, `--summary`,