[git-tools] Prepend the branch to the commit message for all branches.

This commit is contained in:
Chris Smith 2010-04-03 02:13:48 +01:00
parent b6920b7ca8
commit 3e5236dcd6

View file

@ -28,7 +28,7 @@ branch="$(echo "$branch" | sed "s/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/ or feature/
if [ "$2" = "" ] && [ $(echo "$branch" | grep -e "^\(bug\|feature\)/") ]
if [ "$2" = "" ]
then
echo "[$branch] $(cat "$1")" > "$1"
fi