# HG changeset patch # User zegervdv # Date 1393173529 -3600 # Node ID a8279f1d5b390f2a859b7d6ba95491ac354545fe # Parent 4687ecd3ea52290d8c3a6d1c6f139bcfe74458d3 Add template hooks diff -r 4687ecd3ea52 -r a8279f1d5b39 gitconfig --- a/gitconfig Sun Feb 23 17:38:34 2014 +0100 +++ b/gitconfig Sun Feb 23 17:38:49 2014 +0100 @@ -31,3 +31,5 @@ # # Setting to git 2.0 default to surpress warning message default = simple +[init] + templatedir = ~/.templates/git diff -r 4687ecd3ea52 -r a8279f1d5b39 templates/git/hooks/ctags --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/git/hooks/ctags Sun Feb 23 17:38:49 2014 +0100 @@ -0,0 +1,6 @@ +#!/bin/sh +set -e +PATH="/usr/local/bin:$PATH" +trap "rm -f .git/tags.$$" EXIT +ctags --tag-relative -Rf.git/tags.$$ --exclude=.git --languages=-javascript,sql +mv .git/tags.$$ .git/tags diff -r 4687ecd3ea52 -r a8279f1d5b39 templates/git/hooks/post-checkout --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/git/hooks/post-checkout Sun Feb 23 17:38:49 2014 +0100 @@ -0,0 +1,2 @@ +#!/bin/sh +.git/hooks/ctags >/dev/null 2>&1 & diff -r 4687ecd3ea52 -r a8279f1d5b39 templates/git/hooks/post-commit --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/git/hooks/post-commit Sun Feb 23 17:38:49 2014 +0100 @@ -0,0 +1,2 @@ +#!/bin/sh +.git/hooks/ctags >/dev/null 2>&1 & diff -r 4687ecd3ea52 -r a8279f1d5b39 templates/git/hooks/post-merge --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/git/hooks/post-merge Sun Feb 23 17:38:49 2014 +0100 @@ -0,0 +1,2 @@ +#!/bin/sh +.git/hooks/ctags >/dev/null 2>&1 & diff -r 4687ecd3ea52 -r a8279f1d5b39 templates/git/hooks/post-rewrite --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/git/hooks/post-rewrite Sun Feb 23 17:38:49 2014 +0100 @@ -0,0 +1,4 @@ +#!/bin/sh +case "$1" in + rebase) exec .git/hooks/post-merge ;; +esac