From f0509e4620643549caa7a486d54b12d53617ab94 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Tue, 22 Jun 2010 14:42:02 +0200 Subject: [task/git-tools] append ticket id to git log message PHPBB3-9770 --- git-tools/hooks/prepare-commit-msg | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'git-tools') diff --git a/git-tools/hooks/prepare-commit-msg b/git-tools/hooks/prepare-commit-msg index 033cb187c7..ab01f49b5a 100755 --- a/git-tools/hooks/prepare-commit-msg +++ b/git-tools/hooks/prepare-commit-msg @@ -32,3 +32,10 @@ if [ "$2" = "" ] then echo "[$branch] $(cat "$1")" > "$1" fi + +if (echo $branch | grep '^ticket/') +then + ticket_id="$(echo $branch | sed "s/ticket\///g")" + echo >> "$1" + echo "PHPBB3-$ticket_id" >> "$1" +fi -- cgit v1.2.1