This should do what you want.
author="Some User"
searchstring=string
searchfiles=(file1 file2 file3) # Leave empty for all files.
while IFS= read -rd '' file; read -rd '' nr; read -r line; do
if git annotate -p -L "$nr,$nr" -- "$file" | grep -q "$author"; then
printf '%s:%s:%s\n' "$file" "$nr" "$line"
fi
done < <(git grep -nz "$searchstring" -- "${searchfiles[@]}")
Whether this works better/faster than Jonathan.Brink's answer is going to depend on the volume of matches for the line, the size of the history, where the author's commits live in the history, whether the change is in a more recent or less recent commit of the author's, etc.
Uses git grep -z
to be safe for arbitrary file names and read -d ''
to read those NUL
-delimited fields.
Uses git annotate -L
to limit lines that need annotation.
Output is the original git grep -n
output but only for the author-matching lines.