1
0
mirror of https://github.com/balkian/dotfiles.git synced 2024-11-14 00:32:28 +00:00
dotfiles/scripts/.bin/find-blob.sh
J. Fernando Sánchez fc49bdf6c4 Lots of changes
New termite theme
Changed i3 configuration
Added run script and find_blob script
2017-03-24 16:29:31 +01:00

15 lines
342 B
Bash
Executable File

#!/bin/sh
obj_name="$1"
shift
git ls-files --stage \
| if grep -q "$obj_name"; then
echo Found in staging area. Run git ls-files --stage to see.
fi
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