Browse Source

Documentation: move blame examples

This moves the example to specify a line range with regexps to
a later part of the manual page that has similar examples.

Signed-off-by: Junio C Hamano <junkio@cox.net>
maint
Junio C Hamano 19 years ago
parent
commit
18d5453ed3
  1. 11
      Documentation/git-blame.txt

11
Documentation/git-blame.txt

@ -41,10 +41,7 @@ OPTIONS
Use the same output mode as gitlink:git-annotate[1] (Default: off). Use the same output mode as gitlink:git-annotate[1] (Default: off).


-L n,m:: -L n,m::
Annotate only the specified line range (lines count from Annotate only the specified line range (lines count from 1).
1). The range can be specified with a regexp. For
example, `-L '/^sub esc_html /,/^}$/'` limits the
annotation only to the body of `esc_html` subroutine.


-l, --long:: -l, --long::
Show long rev (Default: off). Show long rev (Default: off).
@ -125,6 +122,12 @@ ll. 40-60 for file `foo`, you can use `-L` option like this:


git blame -L 40,60 foo git blame -L 40,60 foo


Also you can use regular expression to specify the line range.

git blame -L '/^sub hello {/,/^}$/' foo

would limit the annotation to the body of `hello` subroutine.

When you are not interested in changes older than the version When you are not interested in changes older than the version
v2.6.18, or changes older than 3 weeks, you can use revision v2.6.18, or changes older than 3 weeks, you can use revision
range specifiers similar to `git-rev-list`: range specifiers similar to `git-rev-list`:

Loading…
Cancel
Save