diff options
author | Andreas Fischer <bantu@phpbb.com> | 2010-08-10 15:50:53 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2010-08-10 15:50:53 +0200 |
commit | 1778b53f1281306a7c35c56fb72335e2a070f925 (patch) | |
tree | 6d498490c525d332b4f9b8b0bc462bb386fb12de /git-tools/hooks/prepare-commit-msg | |
parent | e1328e87ce23245dbd55a08fbaf3d48e957a6777 (diff) | |
parent | e17ffa01e6f536b0868106405993361f1d978706 (diff) | |
download | forums-1778b53f1281306a7c35c56fb72335e2a070f925.tar forums-1778b53f1281306a7c35c56fb72335e2a070f925.tar.gz forums-1778b53f1281306a7c35c56fb72335e2a070f925.tar.bz2 forums-1778b53f1281306a7c35c56fb72335e2a070f925.tar.xz forums-1778b53f1281306a7c35c56fb72335e2a070f925.zip |
Merge branch 'task/cs278/git-tools' into develop-olympus
* task/cs278/git-tools:
[task/git-tools] Ignore git commit message comments
[task/git-tools] Adjust the hook to enforce that a ticket is always mentioned
[task/git-tools] Vastly expanded commit-msg hook.
[task/git-tools] Beginnings of a syntax checking hook.
[task/git-tools] Append ticket identifier to commit message prior to editing.
[task/git-tools] add install and uninstall scripts for hooks
[task/git-tools] move ticket id appending to commit-msg hook
[task/git-tools] append ticket id to git log message
Diffstat (limited to 'git-tools/hooks/prepare-commit-msg')
-rwxr-xr-x | git-tools/hooks/prepare-commit-msg | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/git-tools/hooks/prepare-commit-msg b/git-tools/hooks/prepare-commit-msg index 033cb187c7..2bf25e58a4 100755 --- a/git-tools/hooks/prepare-commit-msg +++ b/git-tools/hooks/prepare-commit-msg @@ -30,5 +30,13 @@ branch="$(echo "$branch" | sed "s/refs\/heads\///g")" # * also make sure the branch name begins with bug/ or feature/ if [ "$2" = "" ] then - echo "[$branch] $(cat "$1")" > "$1" + tail=""; + + # Branch is prefixed with 'ticket/', append ticket ID to message + if [ "$branch" != "${branch##ticket/}" ]; + then + tail="\n\nPHPBB3-${branch##ticket/}"; + fi + + echo "[$branch]$tail $(cat "$1")" > "$1" fi |