Here is my post-receive hook:
#!/bin/bash
while read oldrev newrev ref; do
git diff --name-only oldrev..newrev
git --work-tree=/tmp checkout HEAD -- plugin.yml
echo -e "Test complete maybe..." | tee >(exec logger)
done
And here is the output:
And if I replace oldrev..newrev by oldrev -- newrev, the output is:
I need to get folder in which this file(plugin.yml) was modified. Thanks.