From 0a6db697e6f50551270c7bc3e61fb587b7043099 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Mon, 8 Mar 2010 01:04:33 +0100 Subject: [PATCH] Add feature/ support to branchname hook The previously introduced branchname hook now will also use feature/ branch names, in addition to the existing bug/. --- git-tools/hooks/prepare-commit-msg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-tools/hooks/prepare-commit-msg b/git-tools/hooks/prepare-commit-msg index 284354081e..e1e05d67b8 100755 --- a/git-tools/hooks/prepare-commit-msg +++ b/git-tools/hooks/prepare-commit-msg @@ -18,7 +18,7 @@ branch="$(cat $GIT_DIR/HEAD | sed 's/ref: refs\/heads\///g')" # * only run when normal commit is made (without -m or -F; # not a merge, etc.) -# * also make sure the branch name begins with bug/ -if [ "$2" = "" ] && [ $(echo "$branch" | grep -e '^bug/') ]; then +# * also make sure the branch name begins with bug/ or feature/ +if [ "$2" = "" ] && [ $(echo "$branch" | grep -e '^\(bug\|feature\)/') ]; then echo "[$branch] $(cat $1)" > "$1" fi