From: Bob Hiestand Date: Thu, 7 Jul 2011 17:22:38 +0000 (-0500) Subject: add 'VCSCommandVCSTypeExplicitOverride' for a more dynamic switch X-Git-Tag: v1.99.44~6 X-Git-Url: https://repo.or.cz/w/vcscommand.git/commitdiff_plain/7ca8d032cbe1d714d07cefe8b064696c7f161cd4 add 'VCSCommandVCSTypeExplicitOverride' for a more dynamic switch --- diff --git a/plugin/vcscommand.vim b/plugin/vcscommand.vim index 05ac69e..349513e 100644 --- a/plugin/vcscommand.vim +++ b/plugin/vcscommand.vim @@ -1102,10 +1102,13 @@ endfunction " 7. error if no matching types function! VCSCommandGetVCSType(buffer) - let vcsType = getbufvar(a:buffer, 'VCSCommandVCSType') - if strlen(vcsType) == 0 - let vcsType = s:IdentifyVCSType(a:buffer) - call setbufvar(a:buffer, 'VCSCommandVCSType', vcsType) + let vcsType = VCSCommandGetOption('VCSCommandVCSTypeExplicitOverride', '') + if len(vcsType) == 0 + let vcsType = getbufvar(a:buffer, 'VCSCommandVCSType') + if strlen(vcsType) == 0 + let vcsType = s:IdentifyVCSType(a:buffer) + call setbufvar(a:buffer, 'VCSCommandVCSType', vcsType) + endif endif return vcsType endfunction