I am looking for a way to add the author date to the commit message in GIT, using the prepare-commit-msg hook. This is necessary for a GIT->TFS migration workaround. I came up with the following script, but I couldn't find a way to reference the current commit, so that it would work properly.
#!/bin/sh
git show -s --format="<timestamp>%ai</timestamp>" %curcommit >> $1
What should I insert instead of %curcommit in order for the script to work as intended?