comparison autoload/p44vim.vim @ 2:74b2ef146e82

Also detect P4 depot roots with .p4ignore.txt.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 24 Sep 2020 22:49:05 -0700
parents 953baa4a16bb
children 14a272d72b0a
comparison
equal deleted inserted replaced
1:953baa4a16bb 2:74b2ef146e82
30 function! s:get_p4_depot_root(path) abort 30 function! s:get_p4_depot_root(path) abort
31 let l:cur = a:path 31 let l:cur = a:path
32 let l:prev_cur = '' 32 let l:prev_cur = ''
33 while l:cur != l:prev_cur 33 while l:cur != l:prev_cur
34 if filereadable(l:cur.'/.p4config') || 34 if filereadable(l:cur.'/.p4config') ||
35 \filereadable(l:cur.'/.p4ignore') 35 \filereadable(l:cur.'/.p4ignore') ||
36 \filereadable(l:cur.'/.p4ignore.txt')
36 return l:cur 37 return l:cur
37 endif 38 endif
38 let l:prev_cur = l:cur 39 let l:prev_cur = l:cur
39 let l:cur = fnamemodify(l:cur, ':h') 40 let l:cur = fnamemodify(l:cur, ':h')
40 endwhile 41 endwhile