From 13b8f68c1f0b6d4ff5a7bed5a834e7e5e34a9fd0 Mon Sep 17 00:00:00 2001 From: Thomas Rast Date: Thu, 28 Mar 2013 17:47:33 +0100 Subject: log -L: :pattern:file syntax to find by funcname This new syntax finds a funcname matching /pattern/, and then takes from there up to (but not including) the next funcname. So you can say git log -L:main:main.c and it will dig up the main() function and show its line-log, provided there are no other funcnames matching 'main'. Signed-off-by: Thomas Rast Signed-off-by: Junio C Hamano --- Documentation/line-range-format.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Documentation/line-range-format.txt') diff --git a/Documentation/line-range-format.txt b/Documentation/line-range-format.txt index 265bc2329..3e7ce72da 100644 --- a/Documentation/line-range-format.txt +++ b/Documentation/line-range-format.txt @@ -16,3 +16,10 @@ starting at the line given by . This is only valid for and will specify a number of lines before or after the line given by . + + +- :regex ++ +If the option's argument is of the form :regex, it denotes the range +from the first funcname line that matches , up to the next +funcname line. ++ -- cgit v1.2.1