</dt>\r
<dd>\r
<p>\r
- Annotate only the specified line range (lines count from\r
- 1). The range can be specified with a regexp. For\r
- example, <tt>-L <em>/<sup>sub esc_html /,/</sup>}$/</em></tt> limits the\r
- annotation only to the body of <tt>esc_html</tt> subroutine.\r
+ Annotate only the specified line range (lines count from 1).\r
</p>\r
</dd>\r
<dt>\r
<div class="content">\r
<pre><tt>git blame -L 40,60 foo</tt></pre>\r
</div></div>\r
+<p>Also you can use regular expression to specify the line range.</p>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>git blame -L '/^sub hello {/,/^}$/' foo</tt></pre>\r
+</div></div>\r
+<p>would limit the annotation to the body of <tt>hello</tt> subroutine.</p>\r
<p>When you are not interested in changes older than the version\r
v2.6.18, or changes older than 3 weeks, you can use revision\r
range specifiers similar to <tt>git-rev-list</tt>:</p>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 09-Nov-2006 07:37:40 UTC\r
+Last updated 09-Nov-2006 18:45:28 UTC\r
</div>\r
</div>\r
</body>\r
Use the same output mode as gitlink:git-annotate[1] (Default: off).
-L n,m::
- Annotate only the specified line range (lines count from
- 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.
+ Annotate only the specified line range (lines count from 1).
-l, --long::
Show long rev (Default: off).
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
v2.6.18, or changes older than 3 weeks, you can use revision
range specifiers similar to `git-rev-list`: