Hoping there is a way to discover the sha for the commit being generated. Im inside a commit-msg hook. I’d like to append the sha to the end of the commit message so my git gui can build a link to GitHub for me.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The SHA1 hash generation depends on the commit message, so appending the hash to the commit message would cause the hash to be different. You’ve got a chicken or egg problem.