This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# hook identifies jira ids in branch names, adds on more goodies if we are a hotifx or release branch and attempts to prevent blank commit messages...although this needs a bit more work... | |
COMMIT_FILE=$1 | |
COMMIT_MSG=$(cat $1) | |
#First and foremost check whether the commit message is blank. if so then abort the commit. strip any spaces out too | |
#this one only works at present when someone tries to do git commit -m "" or git commit -m " " | |
#if anyone uses tools such as sourcetree, then these GUIs typically present a prompt...eg. "do you want to commit wihtout a message" and pass in optional attributes to git commit to allow this. |