From fd5c74e7818a478fac66d821c38c4c2275c77da6 Mon Sep 17 00:00:00 2001 From: Philippe Blain Date: Sun, 1 Nov 2020 17:28:41 +0000 Subject: 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 , and - Use backticks for literals Signed-off-by: Philippe Blain Signed-off-by: Junio C Hamano diff --git a/Documentation/blame-options.txt b/Documentation/blame-options.txt index 88750af..48bf0ee 100644 --- a/Documentation/blame-options.txt +++ b/Documentation/blame-options.txt @@ -14,8 +14,8 @@ Annotate only the given line range. May be specified multiple times. Overlapping ranges are allowed. + - and are optional. ``-L '' or ``-L ,'' spans from - to end of file. ``-L ,'' spans from start of file to . +'' and '' are optional. `-L ` or `-L ,` spans from +'' to end of file. `-L ,` spans from start of file to ''. + include::line-range-format.txt[] diff --git a/Documentation/line-range-format.txt b/Documentation/line-range-format.txt index 829676f..43759ee 100644 --- a/Documentation/line-range-format.txt +++ b/Documentation/line-range-format.txt @@ -1,30 +1,30 @@ - and can take one of these forms: +'' and '' can take one of these forms: - number + -If or is a number, it specifies an +If '' or '' is a number, it specifies an absolute line number (lines count from 1). + -- /regex/ +- `/regex/` + This form will use the first line matching the given -POSIX regex. If is a regex, it will search from the end of +POSIX regex. If '' is a regex, it will search from the end of the previous `-L` range, if any, otherwise from the start of file. -If is ``^/regex/'', it will search from the start of file. -If is a regex, it will search -starting at the line given by . +If '' is `^/regex/`, it will search from the start of file. +If '' is a regex, it will search +starting at the line given by ''. + - +offset or -offset + -This is only valid for and will specify a number -of lines before or after the line given by . +This is only valid for '' and will specify a number +of lines before or after the line given by ''. + -If ``:'' is given in place of and , it is a +If `:` is given in place of '' and '', it is a regular expression that denotes the range from the first funcname line -that matches , up to the next funcname line. ``:'' +that matches '', up to the next funcname line. `:` searches from the end of the previous `-L` range, if any, otherwise -from the start of file. ``^:'' searches from the start of +from the start of file. `^:` searches from the start of file. diff --git a/Documentation/line-range-options.txt b/Documentation/line-range-options.txt index 266263f..1c90127 100644 --- a/Documentation/line-range-options.txt +++ b/Documentation/line-range-options.txt @@ -1,12 +1,12 @@ -L,::: -L:::: - Trace the evolution of the line range given by "," - (or the function name regex ) within the . You may + Trace the evolution of the line range given by ',' + (or the function name regex '') within the ''. You may not give any pathspec limiters. This is currently limited to a walk starting from a single revision, i.e., you may only give zero or one positive revision arguments, and - and (or ) must exist in the starting revision. + '' and '' (or '') must exist in the starting revision. You can specify this option more than once. Implies `--patch`. Patch output can be suppressed using `--no-patch`, but other diff formats (namely `--raw`, `--numstat`, `--shortstat`, `--dirstat`, `--summary`, -- cgit v0.10.2-6-g49f6