As you noted, you just need to find a fix with what you want tree. If it could be a top-level tree, you will need one additional test, but since it is not, you will not.
Do you want to:
Git "plumbing" grep:
#! /bin/sh
searchfor=4e8f805dd45088219b5662bd3d434eb4c5428ec0
startpoints="master"
git rev-list $startpoints |
while read commithash; do
if git ls-tree -d -r --full-tree $commithash | grep $searchfor; then
echo " -- found at $commithash"
fi
done
, git cat-file -p $commithash , .
, ( -d git ls-tree). blob . grep , , :
040000 tree a3a6276bba360af74985afa8d79cfb4dfc33e337 perl/Git/SVN/Memoize
-- found at 3ab228137f980ff72dbdf5064a877d07bec76df9
, git cat-file -t blob-or-tree, .
source
share