From 25ed3412f86b136efb17689b6712d9e546cac388 Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Thu, 28 Mar 2013 17:47:30 +0100 Subject: Refactor parse_loc We want to use the same style of -L n,m argument for 'git log -L' as for git-blame. Refactor the argument parsing of the range arguments from builtin/blame.c to the (new) file that will hold the 'git log -L' logic. To accommodate different data structures in blame and log -L, the file contents are abstracted away; parse_range_arg takes a callback that it uses to get the contents of a line of the (notional) file. The new test is for a case that made me pause during debugging: the 'blame -L with invalid end' test was the only one that noticed an outright failure to parse the end *at all*. So make a more explicit test for that. Signed-off-by: Bo Yang Signed-off-by: Thomas Rast Signed-off-by: Junio C Hamano --- Makefile | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 26d3332755..89242f5929 100644 --- a/Makefile +++ b/Makefile @@ -683,6 +683,7 @@ LIB_H += help.h LIB_H += http.h LIB_H += kwset.h LIB_H += levenshtein.h +LIB_H += line-range.h LIB_H += list-objects.h LIB_H += ll-merge.h LIB_H += log-tree.h @@ -798,6 +799,7 @@ LIB_OBJS += hex.o LIB_OBJS += ident.o LIB_OBJS += kwset.o LIB_OBJS += levenshtein.o +LIB_OBJS += line-range.o LIB_OBJS += list-objects.o LIB_OBJS += ll-merge.o LIB_OBJS += lockfile.o -- cgit v1.2.3