[git] Add ctags hooks for git

Taken from here:
http://tbaggery.com/2011/08/08/effortless-ctags-with-git.html
pull/28/head
Alpha Chen 11 years ago
parent 2a1700687a
commit bb28d1840d

@ -0,0 +1,8 @@
#!/bin/sh
set -e
PATH="/usr/local/bin:$PATH"
dir="`git rev-parse --git-dir`"
trap 'rm -f "$dir/$$.tags"' EXIT
git ls-files | \
ctags --tag-relative -L - -f"$dir/$$.tags" --languages=-javascript,sql
mv "$dir/$$.tags" "$dir/tags"

@ -0,0 +1,2 @@
#!/bin/sh
.git/hooks/ctags >/dev/null 2>&1 &

@ -0,0 +1,2 @@
#!/bin/sh
.git/hooks/ctags >/dev/null 2>&1 &

@ -0,0 +1,2 @@
#!/bin/sh
.git/hooks/ctags >/dev/null 2>&1 &

@ -0,0 +1,4 @@
#!/bin/sh
case "$1" in
rebase) exec .git/hooks/post-merge ;;
esac
Loading…
Cancel
Save