For a simple template, you can try, for example:
find . -name "*.c" | xargs git log
For a fullscreen regex, you can use:
find . | grep "REGEX" | xargs git log
If you need previously deleted files to be included in the output, you can use
git log --all --pretty=format: --name-only --diff-filter=A | sort -u | grep "REGEX" | xargs git log --
, , - git, answser .