Permalink
Browse files

git: Track repo template for ctags hooks

  • Loading branch information...
ches committed Feb 2, 2013
1 parent 6e7d4c7 commit 895cb459341a0fd8a7588dbb20f1b6dcad7f02c4
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# http://tbaggery.com/2011/08/08/effortless-ctags-with-git.html
+mkdir .git/tags_lock 2>/dev/null || exit 0
+trap "rmdir .git/tags_lock; rm .git/tags.$$" EXIT
+
+ctags --tag-relative -R -f .git/tags.$$ --exclude=.git --languages=-sql
+mv .git/tags.$$ .git/tags
+
@@ -0,0 +1,3 @@
+#!/bin/sh
+.git/hooks/ctags >/dev/null 2>&1 &
+
@@ -0,0 +1,3 @@
+#!/bin/sh
+.git/hooks/ctags >/dev/null 2>&1 &
+
@@ -0,0 +1,3 @@
+#!/bin/sh
+.git/hooks/ctags >/dev/null 2>&1 &
+
@@ -0,0 +1,5 @@
+#!/bin/sh
+case "$1" in
+ rebase) exec .git/hooks/post-merge ;;
+esac
+

0 comments on commit 895cb45

Please sign in to comment.