Find all current lines modified by an author
Maybe just git blame FILE | grep "Some Name"
.
Or if you want to recursively blame+search through multiple files:
for file in $(git ls-files); do git blame $file | grep "Some Name"; done
Note: I had originally suggested using the approach below, but the problem you can run into with it is that it may also possibly find files in your working directory that aren’t actually tracked by git, and so the git blame
will fail for those files and break the loop.
find . -type f -name "*.foo" | xargs git blame | grep "Some Name"
sideshowbarker is mostly correct, but a fixed second command is:
find . -type f -exec git blame {} \; | grep "Some Name"
Though I would prefer to do:
for FILE in $(git ls-files) ; do git blame $FILE | grep "Some Name" ; done | less