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 --- line-range.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'line-range.h') diff --git a/line-range.h b/line-range.h index 88aaf08b7f..ae3d0123b4 100644 --- a/line-range.h +++ b/line-range.h @@ -19,7 +19,8 @@ typedef const char *(*nth_line_fn_t)(void *data, long lno); extern int parse_range_arg(const char *arg, nth_line_fn_t nth_line_cb, void *cb_data, long lines, - long *begin, long *end); + long *begin, long *end, + const char *path); /* * Scan past a range argument that could be parsed by -- cgit v1.2.3