5 cat >.git/hooks/commit-msg <<'FOO'
8 grep -i '\(\(re\|refs\|qa\) #[0-9]\+\)\|\(no ticket\)' "$1" > /dev/null
12 echo "Please reference a ticket"
17 cat >.git/hooks/post-checkout <<'FOO'
20 # The hook is given three parameters: the ref of the previous HEAD, the ref of
21 # the new HEAD (which may or may not have changed), and a flag indicating
22 # whether the checkout was a branch checkout (changing branches, flag=1) or a
23 # file checkout (retrieving a file from the index, flag=0).
25 branch=$(git symbolic-ref HEAD)
26 branch=${branch/refs\/heads\//}
28 git config --list | grep "branch.${branch}.rebase" > /dev/null
29 if [ $? -ne 0 ] ; then
30 git config --add "branch.${branch}.rebase" true