9 echo "xg: locate a file in the source tree and display the full git log information."
10 echo "Usage: xg [filename-substring]"
11 echo "Example: xg /BlockReader.java"
12 echo "Example 2: xg test-patch"
18 trap "rm -rf ${T}; exit" INT TERM EXIT
19 find . -noleaf -xdev -name '*.java' -o -name '*.h' -o -name '*.c' \
20 -o -name '*.cpp' -o -name '*.cxx' -o -name '*.cc' -o -name '*.sh' | \
22 LINES=$(wc -l "${T}" | awk '{print $1}')
23 [ "${LINES}" -lt 1 ] && die "no results"
24 if [ "${LINES}" -gt 1 ]; then
25 echo "multiple results: "
31 git log --follow -p "${F}"