summaryrefslogtreecommitdiff
path: root/commit-msg
diff options
context:
space:
mode:
authorMatt Watson <mattdangerw@gmail.com>2013-04-24 14:56:53 -0700
committerMatt Watson <mattdangerw@gmail.com>2013-04-25 02:19:07 -0700
commit0aec2d73847c74ce783293682b6bc60665ed5d93 (patch)
treee68fcbd6b674d2766c79408ccfd37a046a202a76 /commit-msg
parent1521b0b3283c6ffa2e83aa993eaf7dfcfb28be55 (diff)
Added commit-msg script for issues tracking which autogen installs.
[endlessm/eos-sdk#35]
Diffstat (limited to 'commit-msg')
-rw-r--r--commit-msg14
1 files changed, 14 insertions, 0 deletions
diff --git a/commit-msg b/commit-msg
new file mode 100644
index 0000000..5977945
--- /dev/null
+++ b/commit-msg
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+# move this script to the .git/hooks directory for your repo.
+# make sure to chmod +x .git/hooks/commit-msg
+
+branch=`git rev-parse --abbrev-ref HEAD`
+
+if [[ $branch == issues/* ]]; then
+ link=$(echo $branch | awk -F/ '{ print "[endlessm/eos-sdk#"$2"]" }')
+ echo "issue link: $link"
+ echo $link >> $1
+fi
+
+exit 0