Remove caching mechanism
We introduced this when everything still got executed sychronously. It also dosn't play well with multiple active VCS anymore.
This commit is contained in:
parent
b119f8d81b
commit
92ed727f3a
@ -3,8 +3,6 @@
|
|||||||
scriptencoding utf-8
|
scriptencoding utf-8
|
||||||
|
|
||||||
" Init: values {{{1
|
" Init: values {{{1
|
||||||
let g:sy_cache = {}
|
|
||||||
|
|
||||||
let s:has_doau_modeline = v:version > 703 || v:version == 703 && has('patch442')
|
let s:has_doau_modeline = v:version > 703 || v:version == 703 && has('patch442')
|
||||||
|
|
||||||
" Function: #start {{{1
|
" Function: #start {{{1
|
||||||
@ -91,10 +89,6 @@ function! sy#set_signs(sy, vcs, diff, do_register) abort
|
|||||||
if a:sy.stats == [-1, -1, -1]
|
if a:sy.stats == [-1, -1, -1]
|
||||||
let a:sy.stats = [0, 0, 0]
|
let a:sy.stats = [0, 0, 0]
|
||||||
endif
|
endif
|
||||||
" let dir = fnamemodify(a:sy.path, ':h')
|
|
||||||
" if !has_key(g:sy_cache, dir)
|
|
||||||
" let g:sy_cache[dir] = a:sy.vcs
|
|
||||||
" endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if empty(a:diff)
|
if empty(a:diff)
|
||||||
|
@ -4,17 +4,6 @@ scriptencoding utf-8
|
|||||||
|
|
||||||
" Function: #detect {{{1
|
" Function: #detect {{{1
|
||||||
function! sy#repo#detect(do_register) abort
|
function! sy#repo#detect(do_register) abort
|
||||||
" let vcs_list = s:vcs_list
|
|
||||||
" " Simple cache. If there is a registered VCS-controlled file in this
|
|
||||||
" " directory already, assume that this file is probably controlled by
|
|
||||||
" " the same VCS. Thus we shuffle that VCS to the top of our copy of
|
|
||||||
" " s:vcs_list, so we don't affect the preference order of s:vcs_list.
|
|
||||||
" if has_key(g:sy_cache, b:sy_info.dir)
|
|
||||||
" let vcs_list = [g:sy_cache[b:sy_info.dir]] +
|
|
||||||
" \ filter(copy(s:vcs_list), 'v:val != "'.
|
|
||||||
" \ g:sy_cache[b:sy_info.dir] .'"')
|
|
||||||
" endif
|
|
||||||
|
|
||||||
for vcs in s:vcs_list
|
for vcs in s:vcs_list
|
||||||
let b:sy.detecting += 1
|
let b:sy.detecting += 1
|
||||||
call sy#repo#get_diff_start(vcs, a:do_register)
|
call sy#repo#get_diff_start(vcs, a:do_register)
|
||||||
|
Loading…
Reference in New Issue
Block a user