Quote:
Clearly not what we want, either. So git is using the notion that a function signature must start at the beginning of the line, or it's not the function, but a function call. And I can't think of any other reliable alternative So... ultimately, if you want something better than git's rudimentary assumption, you need to actually parse the language itself -- and that's clearly not git's job.


I see the inherent problem there. So, agreed, doing -L<functionname> is out of the running.


Quote:
git-blame has no equivalent, and does not use PCRE.


If it's not using PCRE, then what *is* it using?

I can't get any of the online regex testers to work using command which do work in Git Blame. For instance, if I go here: https://regex101.com/

When I try to enter this regex (which *WORKS* in git blame though it halts at the first curlybrace it finds):
Code:
/^MyFunctionNameToLocate/,/^}/


All the online regex testers reject that syntax. When I try all the other options at that site:
- PCRE
- Javascript
- Python
- Golang
... none of them work with that syntax.

Whereas if I enter a syntax which works in those online testers, then those syntaxes are rejected by (or fail to find the correct results in) the GIT BLAME command.
_________________________
Tony Fabris