I can output first range matching regex with a command:
git blame -L'/start_regex/','/end_regex/' file
But how to output all next ranges matching this regex in the same file?
As far as I can see, git blame -L'/start_regex/','/end_regex/' will only return the first match.
git blame -L'/start_regex/','/end_regex/'
You now can (git 1.8.5 December 2013) specify multiple ranges, since commit 58dbfa2 and Eric Sunshine's sunshine work.
So you could try (in git 1.8.5, not tested)
git blame -L'/start_regex/','/end_regex/' -L'/start_regex/','/end_regex/' file
That would check if you can get two different matches, but that doesn't scale well.
That means it could be a good idea for a patch to builtin/blame.c.
builtin/blame.c
As far as I can see,
git blame -L'/start_regex/','/end_regex/'
will only return the first match.You now can (git 1.8.5 December 2013) specify multiple ranges, since commit 58dbfa2 and Eric Sunshine's sunshine work.
So you could try (in git 1.8.5, not tested)
That would check if you can get two different matches, but that doesn't scale well.
That means it could be a good idea for a patch to
builtin/blame.c
.