Skip to content

Commit 6b25f5d

Browse files
Revise index-tags script (sds#742)
* Revise index-tags script - based what files are included in tag generation on the files managed by git. Exclude files not managed by git * Revert ctags command to recursively tag all files
1 parent bba5b75 commit 6b25f5d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

libexec/index-tags

+6-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66

77
set -e
88

9-
trap "rm -f $GIT_DIR/tags.$$" EXIT
10-
err_file=$GIT_DIR/ctags.err
11-
if ctags --tag-relative -Rf$GIT_DIR/tags.$$ --exclude=.git "$@" 2>${err_file}; then
12-
mv $GIT_DIR/tags.$$ $GIT_DIR/tags
9+
dir="`git rev-parse --git-dir`"
10+
11+
trap "rm -f $dir/tags.$$" EXIT
12+
err_file=$dir/ctags.err
13+
if ctags --tag-relative -Rf$dir/tags.$$ --exclude=.git "$@" 2>${err_file}; then
14+
mv $dir/tags.$$ $dir/tags
1315
[ -e ${err_file} ] && rm -f ${err_file}
1416
else
1517
# Ignore STDERR unless `ctags` returned a non-zero exit code

0 commit comments

Comments
 (0)