aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Wiedler <igor@wiedler.ch>2010-03-08 01:04:33 +0100
committerIgor Wiedler <igor@wiedler.ch>2010-03-08 01:04:33 +0100
commit0a6db697e6f50551270c7bc3e61fb587b7043099 (patch)
tree2b2535a39ff334fec91ba57061285fcfd9685796 /git-tools/hooks
parentAdding a branchname prepare-commit-msg hook (diff)
downloadphpbb-0a6db697e6f50551270c7bc3e61fb587b7043099.tar.gz
phpbb-0a6db697e6f50551270c7bc3e61fb587b7043099.tar.bz2
phpbb-0a6db697e6f50551270c7bc3e61fb587b7043099.zip
Add feature/ support to branchname hook
The previously introduced branchname hook now will also use feature/ branch names, in addition to the existing bug/.
Diffstat (limited to 'git-tools/hooks')
-rwxr-xr-xgit-tools/hooks/prepare-commit-msg4
1 files 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