Originally Posted By: peter
(if you can't get -L:funcname to work -- perhaps your git is too old?)

>git --version
git version 2.10.0.windows.1
I'm pretty sure that's within the last few weeks at least.

Can anyone help me figure out the precise syntax by which this feature is supposed to work? Because that's what I really want: Git should be able to figure out for me the contents of the function if I name the function for it. Their own docs say so, I just can't get it to work.

If I try to follow the instructions here.... https://git-scm.com/docs/git-blame
It says:
Quote:
If “:<funcname>” is given in place of <start> and <end>, it is a regular expression that denotes the range from the first funcname line that matches <funcname>, up to the next funcname line. “:<funcname>” searches from the end of the previous -L range, if any, otherwise from the start of file. “^:<funcname>” searches from the start of file.

That looks like exactly what I want. So I try it:
Code:
git blame -e -L:JustTheNameOfMyFunction C:\folder\folder\folder\filename.cs


No joy, it gives me the following error:
Code:
fatal: -L parameter 'JustTheNameOfMyFunction' starting at line 1: no match

Which is not true. There is a perfectly good function of that name inside the file.

Googling for the correct syntax, some of the responses say that it should be L:Funcname:filename instead of L:Funcame filename. But that DEFINITELY does not work because when I try it, Git doesn't even try to run, it just spits its Usage statement back at me again as if I hadn't supplied the correct parameters.
_________________________
Tony Fabris