nvim: session: Do not depend on fugitive#Head

We intend to try jujutsu with various repos and fugitive#Head
does not work for jujutsu repos which intend to be in detached
head state.
This commit is contained in:
Sanchayan Maity 2024-12-09 15:05:12 +05:30
parent 24de7dc771
commit 55a5e35d3d

View file

@ -27,10 +27,9 @@ endfunction
function! s:SessionLoad()
" Do not load session if
" - neovim is started with arguments
" - neovim is opened outside a git repository
" - neovim is in pager mode and is getting input from STDIN
" - neovim is opened with nvim -q
if (argc(-1) > 0 || fugitive#Head() == '' || g:session_in_pager_mode == 1 || (!empty(getqflist())))
if (argc(-1) > 0 || g:session_in_pager_mode == 1 || (!empty(getqflist())))
return
endif