From d1406ae23a8ff13b3092f22655f73d44df6bf731 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sun, 16 Dec 2012 20:23:12 -0500 Subject: [PATCH] Revert "s:Detect: only add readable files to &tags and doc" This reverts commit 31dead6d8088dc7073d0e2645517ebc68d6de06b. Generating the tags file after already loading the buffer burns me over and over and over again, and I'm not convinced there was a problem to begin with. --- plugin/fugitive.vim | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 77cdf82..722f6cf 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -151,18 +151,10 @@ function! s:Detect(path) if expand('%:p') =~# '//' call buffer.setvar('&path', s:sub(buffer.getvar('&path'), '^\.%(,|$)', '')) endif - " Look for tags file in .git dir and add them to &tags - " See http://tbaggery.com/2011/08/08/effortless-ctags-with-git.html - let tagsfile = b:git_dir.'/tags' - if stridx(buffer.getvar('&tags'), escape(tagsfile, ', ')) == -1 - if filereadable(tagsfile) - call buffer.setvar('&tags', escape(tagsfile, ', ').','.buffer.getvar('&tags')) - endif + if stridx(buffer.getvar('&tags'), escape(b:git_dir.'/tags', ', ')) == -1 + call buffer.setvar('&tags', escape(b:git_dir.'/tags', ', ').','.buffer.getvar('&tags')) if &filetype !=# '' - let tagsfile = b:git_dir.'/'.&filetype.'.tags' - if filereadable(tagsfile) - call buffer.setvar('&tags', escape(tagsfile, ', ').','.buffer.getvar('&tags')) - endif + call buffer.setvar('&tags', escape(b:git_dir.'/'.&filetype.'.tags', ', ').','.buffer.getvar('&tags')) endif endif endif