[x] If functionality is added or modified, also made respective changes to the readme.
[x] Used conventional commits keywords.
Changes
I was trying to get functionHistory to work with Swift. I modified my git-attributes so git log -L :func:file works with Swift, but invoking functionHistory() presented an empty list. Turns out Swift functions have kind "Method" instead of "Function", so I added that to the filter.
In addition, for Method I had to strip off everything after the initial function name (foo(bar:baz:) → foo), otherwise git log ... would fail.
This change should be transparent to the user, so I didn't update the README.
Checklist
Changes
I was trying to get
functionHistory
to work with Swift. I modified my git-attributes sogit log -L :func:file
works with Swift, but invokingfunctionHistory()
presented an empty list. Turns out Swift functions have kind "Method" instead of "Function", so I added that to the filter.In addition, for Method I had to strip off everything after the initial function name (
foo(bar:baz:)
→foo
), otherwisegit log ...
would fail.This change should be transparent to the user, so I didn't update the README.