Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ctags git hooks

  • Loading branch information...
commit a4ad0959d44528b8f5a1377dcca07f67c639c781 1 parent ed72503
@lucapette authored
View
4 git_template/hooks/ctags
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+rm -f .git/tags
+ctags --tag-relative -f .git/tags --exclude=.git --languages=-javascript,sql -R
View
3  git_template/hooks/post-checkout
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+.git/hooks/ctags >/dev/null 2>&1 &
View
3  git_template/hooks/post-commit
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+.git/hooks/ctags >/dev/null 2>&1 &
View
3  git_template/hooks/post-merge
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+.git/hooks/ctags >/dev/null 2>&1 &
View
5 git_template/hooks/post-rewrite
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+case "$1" in
+ rebase) exec .git/hooks/post-merge ;;
+esac
View
3  gitconfig
@@ -9,6 +9,7 @@
[alias]
ck = checkout
co = commit
+ ctags = "!sh -c '[ -f .git/hooks/ctags ] || git init; .git/hooks/ctags' git-ctags"
df = diff
gl = log --reverse --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
latest = diff @{1}
@@ -35,3 +36,5 @@
added = yellow
changed = green
untracked = cyan
+[init]
+ templatedir = ~/.git_template
Please sign in to comment.
Something went wrong with that request. Please try again.