Skip to content

Commit f9c8d8c

Browse files
phil-blaingitster
authored andcommitted
doc: log, gitk: move '-L' description to 'line-range-options.txt'
The description of the '-L' option for `git log` and `gitk` is almost the same, but is repeated in both 'git-log.txt' and 'gitk.txt' (the difference being that 'git-log.txt' lists the option with a space after '-L', while 'gitk.txt' lists it as stuck and notes that `gitk` only understands the stuck form). Reduce duplication by creating a new file, 'line-range-options.txt', and include it in both files. To simplify the presentation, only list the stuck form for both commands, and remove the note about `gitk` only understanding the stuck form. Signed-off-by: Philippe Blain <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e2850a2 commit f9c8d8c

File tree

3 files changed

+17
-33
lines changed

3 files changed

+17
-33
lines changed

Documentation/git-log.txt

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,7 @@ produced by `--stat`, etc.
7777
Intended to speed up tools that read log messages from `git log`
7878
output by allowing them to allocate space in advance.
7979

80-
-L <start>,<end>:<file>::
81-
-L :<funcname>:<file>::
82-
Trace the evolution of the line range given by "<start>,<end>"
83-
(or the function name regex <funcname>) within the <file>. You may
84-
not give any pathspec limiters. This is currently limited to
85-
a walk starting from a single revision, i.e., you may only
86-
give zero or one positive revision arguments, and
87-
<start> and <end> (or <funcname>) must exist in the starting revision.
88-
You can specify this option more than once. Implies `--patch`.
89-
Patch output can be suppressed using `--no-patch`, but other diff formats
90-
(namely `--raw`, `--numstat`, `--shortstat`, `--dirstat`, `--summary`,
91-
`--name-only`, `--name-status`, `--check`) are not currently implemented.
92-
+
93-
include::line-range-format.txt[]
80+
include::line-range-options.txt[]
9481

9582
<revision range>::
9683
Show only commits in the specified revision range. When no

Documentation/gitk.txt

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -98,25 +98,7 @@ linkgit:git-rev-list[1] for a complete list.
9898
(See "History simplification" in linkgit:git-log[1] for a more
9999
detailed explanation.)
100100

101-
-L<start>,<end>:<file>::
102-
-L:<funcname>:<file>::
103-
104-
Trace the evolution of the line range given by "<start>,<end>"
105-
(or the function name regex <funcname>) within the <file>. You may
106-
not give any pathspec limiters. This is currently limited to
107-
a walk starting from a single revision, i.e., you may only
108-
give zero or one positive revision arguments, and
109-
<start> and <end> (or <funcname>) must exist in the starting revision.
110-
You can specify this option more than once. Implies `--patch`.
111-
Patch output can be suppressed using `--no-patch`, but other diff formats
112-
(namely `--raw`, `--numstat`, `--shortstat`, `--dirstat`, `--summary`,
113-
`--name-only`, `--name-status`, `--check`) are not currently implemented.
114-
+
115-
*Note:* gitk (unlike linkgit:git-log[1]) currently only understands
116-
this option if you specify it "glued together" with its argument. Do
117-
*not* put a space after `-L`.
118-
+
119-
include::line-range-format.txt[]
101+
include::line-range-options.txt[]
120102

121103
<revision range>::
122104

Documentation/line-range-options.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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
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.
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`,
13+
`--name-only`, `--name-status`, `--check`) are not currently implemented.
14+
+
15+
include::line-range-format.txt[]

0 commit comments

Comments
 (0)