Created
June 29, 2010 19:40
-
-
Save gf3/457702 to your computer and use it in GitHub Desktop.
Regenerate ctags on checkout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Regenerate ctags on checkout | |
# project/.git/hooks/post-checkout | |
DIR=$GIT_DIR | |
if [ 0 -eq $3 ]; then | |
# file checkout | |
else | |
# tree checkout | |
FILES=$(git diff-tree --diff-filter=ACMR --name-only -w -r $1 $2) | |
if [ -n "$FILES" ]; then | |
exctags -a $FILES | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment