blame: accept multiple -L ranges
commit58dbfa2e59a11b3dd060d69788af4c3decc7ee22
authorEric Sunshine <sunshine@sunshineco.com>
Tue, 6 Aug 2013 13:59:38 +0000 (6 09:59 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 6 Aug 2013 21:29:35 +0000 (6 14:29 -0700)
tree561cffcf76893d46b002ad2e7c3b57fe91896ffd
parent753935749f21b10b306bc81559bba2912a7128a6
blame: accept multiple -L ranges

git-blame accepts only a single -L option or none. Clients requiring
blame information for multiple disjoint ranges are therefore forced
either to invoke git-blame multiple times, once for each range, or only
once with no -L option to cover the entire file, both of which can be
costly.  Teach git-blame to accept multiple -L ranges.  Overlapping and
out-of-order ranges are accepted.

In this patch, the X in -LX,Y is absolute (for instance, /RE/ patterns
search from line 1), and Y is relative to X. Follow-up patches provide
more flexibility over how X is anchored.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/blame.c