I need to write a script that will
- iterate through all of the commits on a branch, starting from the most recent
- for each commit, iterate through all of the files in the commit
- if it finds a file of type hbm.xml, store the commit to file and exit.
I have a script for step 2:
for i in `git show --pretty="format:" --name-only SHA1 | grep '.*\.hbm\.xml' `; do
# call script here.....
exit
done
Now, I need to figure out step 1.