git: effortless Ctags with Git

http://tbaggery.com/2011/08/08/effortless-ctags-with-git.html

Git hooks are repository specific. Some would recommend using a script to install said hooks into a given
repository. But for me, that’s too manual. Let’s set up a default set of hooks that Git will use as a
template when creating or cloning a repository (requires Git 1.7.1 or newer)

For a one-off re-index: git ctags

I stick the tags file in .git because if fugitive.vim is installed, Vim will be configured to look for it
there automatically, regardless of your current working directory. Plus, you don’t need to worry about
adding it to .gitignore.

post-rewrite is fired after 'git commit --amend' and 'git rebase', but the former is already covered by
post-commit.

Once you get this all set up, you can use git init in existing repositories to copy these hooks in.

So what does this get you? Any new repositories you create or clone will be immediately indexed with
Ctags and set up to re-index every time you check out, commit, merge, or rebase. Basically, you’ll never
have to manually run Ctags on a Git repository again.

Note: --fields=+l is needed by YCM.
vim: YCM: also collect identifiers from tags files
vim: vundle: tagbar