diff options
author | Igor Wiedler <igor@wiedler.ch> | 2010-03-08 01:04:33 +0100 |
---|---|---|
committer | Igor Wiedler <igor@wiedler.ch> | 2010-03-08 01:04:33 +0100 |
commit | 0a6db697e6f50551270c7bc3e61fb587b7043099 (patch) | |
tree | 2b2535a39ff334fec91ba57061285fcfd9685796 /git-tools | |
parent | Adding a branchname prepare-commit-msg hook (diff) | |
download | phpbb-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')
-rwxr-xr-x | git-tools/hooks/prepare-commit-msg | 4 |
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 |