summaryrefslogtreecommitdiffstats
path: root/runtime/ftplugin/git.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-05-21 12:05:36 +0200
committerBram Moolenaar <Bram@vim.org>2010-05-21 12:05:36 +0200
commit7a329911b9ae2b97453fd995bc3a6523cf3aab53 (patch)
treeb75f6a117f48fe0c441b67cca09490f623233a74 /runtime/ftplugin/git.vim
parentc6af8125c7593b3ca104bf1feac0d814fe76d92d (diff)
Updated runtime files.
Diffstat (limited to 'runtime/ftplugin/git.vim')
-rw-r--r--runtime/ftplugin/git.vim32
1 files changed, 16 insertions, 16 deletions
diff --git a/runtime/ftplugin/git.vim b/runtime/ftplugin/git.vim
index 63d4f338ed..e043c7587e 100644
--- a/runtime/ftplugin/git.vim
+++ b/runtime/ftplugin/git.vim
@@ -1,33 +1,33 @@
" Vim filetype plugin
" Language: generic git output
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
-" Last Change: 2009 Dec 24
+" Last Change: 2010 May 21
" Only do this when not done yet for this buffer
if (exists("b:did_ftplugin"))
- finish
+ finish
endif
let b:did_ftplugin = 1
if !exists('b:git_dir')
- if expand('%:p') =~# '\.git\>'
- let b:git_dir = matchstr(expand('%:p'),'.*\.git\>')
- elseif $GIT_DIR != ''
- let b:git_dir = $GIT_DIR
- endif
- if (has('win32') || has('win64')) && exists('b:git_dir')
- let b:git_dir = substitute(b:git_dir,'\\','/','g')
- endif
+ if expand('%:p') =~# '\.git\>'
+ let b:git_dir = matchstr(expand('%:p'),'.*\.git\>')
+ elseif $GIT_DIR != ''
+ let b:git_dir = $GIT_DIR
+ endif
+ if (has('win32') || has('win64')) && exists('b:git_dir')
+ let b:git_dir = substitute(b:git_dir,'\\','/','g')
+ endif
endif
if exists('*shellescape') && exists('b:git_dir') && b:git_dir != ''
- if b:git_dir =~# '/\.git$' " Not a bare repository
- let &l:path = escape(fnamemodify(b:git_dir,':h'),'\, ').','.&l:path
- endif
- let &l:path = escape(b:git_dir,'\, ').','.&l:path
- let &l:keywordprg = 'git --git-dir='.shellescape(b:git_dir).' show'
+ if b:git_dir =~# '/\.git$' " Not a bare repository
+ let &l:path = escape(fnamemodify(b:git_dir,':h'),'\, ').','.&l:path
+ endif
+ let &l:path = escape(b:git_dir,'\, ').','.&l:path
+ let &l:keywordprg = 'git --git-dir='.shellescape(b:git_dir).' show'
else
- setlocal keywordprg=git\ show
+ setlocal keywordprg=git\ show
endif
if has('gui_running')
let &l:keywordprg = substitute(&l:keywordprg,'^git\>','git --no-pager','')