hook to get info on commit, and include that in a file that is part of the commit
- From
Larry Martell <larry.martell@gmail.com>
- Date
- Feb 5, 2019, 01:36 UTC
- Message-ID
- <CACwCsY5xU0pUaPZDJMqWNB0dz7DjTx3_b2Lvrft0NjA6cnPvcg@mail.gmail.com>
Is there any way using a git hook to get info on the commit (id, message), put that in a file, and include that file in the commit?
If I try that in a pre-commit hook I do not get the info on the current commit. I tried it in pre-receive but it does not seem to get executed at all.
If I do it in post-receive it's too late to check the file in with the commit.
Os there no way to do this?