I’ve created a hook that sends out notification emails when a developer pushes an update to his shared repository. This email includes a list of changed files, example:
A __classes/Page/Activity.php
M __config/Scheme.php
that I generate using the following bit of bash:
$(git diff "$newrev"^ "$newrev" --name-status)
This works fine. However, I’m trying to port all this now to the well-known post-receive-email hook. This hook does have a hooks.showrev configuration directive, but this I think this only allows for the revision number (%s) to be used once in the command. So this doesn’t work:
showrev = "git diff %s^ %s --name-status"
There must be a ‘plumbing’ command that does just this. Can anyone point me in the right direction? 🙂
How about using the following?
git showis porcelain rather than plumbing, but I think this is what you want.