Skip to content

Instantly share code, notes, and snippets.

@jsarenik
Created April 25, 2014 09:51
Show Gist options
  • Save jsarenik/11284034 to your computer and use it in GitHub Desktop.
Save jsarenik/11284034 to your computer and use it in GitHub Desktop.
#!/bin/sh
obj_name="$1"
shift
git log "$@" --pretty=format:'%T %h %s' \
| while read tree commit subject ; do
if git ls-tree -r $tree | grep -q "$obj_name" ; then
echo $commit "$subject"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment