-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use ripper-tags for post-checkout hook
- Loading branch information
1 parent
ffcc385
commit 02fac98
Showing
2 changed files
with
12 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/sh | ||
# Slightly modified from Tim Pope’s original, see: | ||
# http://tbaggery.com/2011/08/08/effortless-ctags-with-git.html#comment-2347209899 | ||
.git/hooks/ctags >/dev/null 2>&1 || true & | ||
.git/hooks/ripper-tags >/dev/null 2>&1 || true & |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
# Changed from Tim Pope’s original to use ripper-tags, see: | ||
# http://tbaggery.com/2011/08/08/effortless-ctags-with-git.html#comment-1502773044 | ||
set -e | ||
# `ripper-tags` is a gem, need it in our path | ||
PATH="$GEM_PATH:$PATH" | ||
dir="`git rev-parse --git-dir`" | ||
trap 'rm -f "$dir/$$.tags"' EXIT | ||
git ls-files | \ | ||
ripper-tags -R --tag-relative --exclude=vendor,public -f "$dir/$$.tags" | ||
mv "$dir/$$.tags" "$dir/tags" |