From 3e5236dcd62f1d0b18cd3c92661a2287b5bbf2d6 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Sat, 3 Apr 2010 02:13:48 +0100 Subject: [git-tools] Prepend the branch to the commit message for all branches. --- git-tools/hooks/prepare-commit-msg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-tools') diff --git a/git-tools/hooks/prepare-commit-msg b/git-tools/hooks/prepare-commit-msg index 354b539cc1..033cb187c7 100755 --- a/git-tools/hooks/prepare-commit-msg +++ b/git-tools/hooks/prepare-commit-msg @@ -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 -- cgit v1.2.1