1. Ches Martin
  2. dotfiles

Commits

Ches Martin  committed e27481f

git: Track repo template for ctags hooks

  • Participants
  • Parent commits 95e2576
  • Branches default

Comments (0)

Files changed (5)

File .git_template/hooks/ctags

View file
+#!/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
+

File .git_template/hooks/post-checkout

View file
+#!/bin/sh
+.git/hooks/ctags >/dev/null 2>&1 &
+

File .git_template/hooks/post-commit

View file
+#!/bin/sh
+.git/hooks/ctags >/dev/null 2>&1 &
+

File .git_template/hooks/post-merge

View file
+#!/bin/sh
+.git/hooks/ctags >/dev/null 2>&1 &
+

File .git_template/hooks/post-rewrite

View file
+#!/bin/sh
+case "$1" in
+  rebase) exec .git/hooks/post-merge ;;
+esac
+