2020-11-01 18:28:41 +01:00
|
|
|
'<start>' and '<end>' can take one of these forms:
|
2013-08-06 15:59:35 +02:00
|
|
|
|
2013-03-28 17:47:30 +01:00
|
|
|
- number
|
|
|
|
+
|
2020-11-01 18:28:41 +01:00
|
|
|
If '<start>' or '<end>' is a number, it specifies an
|
2013-03-28 17:47:30 +01:00
|
|
|
absolute line number (lines count from 1).
|
|
|
|
+
|
|
|
|
|
2020-11-01 18:28:41 +01:00
|
|
|
- `/regex/`
|
2013-03-28 17:47:30 +01:00
|
|
|
+
|
|
|
|
This form will use the first line matching the given
|
2020-11-01 18:28:41 +01:00
|
|
|
POSIX regex. If '<start>' is a regex, it will search from the end of
|
2013-08-06 15:59:44 +02:00
|
|
|
the previous `-L` range, if any, otherwise from the start of file.
|
2020-11-01 18:28:41 +01:00
|
|
|
If '<start>' is `^/regex/`, it will search from the start of file.
|
|
|
|
If '<end>' is a regex, it will search
|
|
|
|
starting at the line given by '<start>'.
|
2013-03-28 17:47:30 +01:00
|
|
|
+
|
|
|
|
|
|
|
|
- +offset or -offset
|
|
|
|
+
|
2020-11-01 18:28:41 +01:00
|
|
|
This is only valid for '<end>' and will specify a number
|
|
|
|
of lines before or after the line given by '<start>'.
|
2013-03-28 17:47:33 +01:00
|
|
|
|
|
|
|
+
|
2020-11-01 18:28:41 +01:00
|
|
|
If `:<funcname>` is given in place of '<start>' and '<end>', it is a
|
2015-04-20 14:09:06 +02:00
|
|
|
regular expression that denotes the range from the first funcname line
|
2020-11-01 18:28:41 +01:00
|
|
|
that matches '<funcname>', up to the next funcname line. `:<funcname>`
|
2015-04-20 14:09:06 +02:00
|
|
|
searches from the end of the previous `-L` range, if any, otherwise
|
2020-11-01 18:28:41 +01:00
|
|
|
from the start of file. `^:<funcname>` searches from the start of
|
2020-11-01 18:28:43 +01:00
|
|
|
file. The function names are determined in the same way as `git diff`
|
|
|
|
works out patch hunk headers (see 'Defining a custom hunk-header'
|
|
|
|
in linkgit:gitattributes[5]).
|