Merge pull request #2457 from ytian81/remove_hunks_dependency_on_branch

Remove gitgutter hunks summary dependency on branch
This commit is contained in:
Christian Brabandt 2021-11-03 20:50:19 +01:00 committed by GitHub
commit 17f7dff748
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,16 +52,9 @@ function! s:get_hunks_coc() abort
return result
endfunction
function! s:is_branch_empty() abort
return exists('*airline#extensions#branch#head') &&
\ empty(get(b:, 'airline_head', ''))
endfunction
function! s:get_hunks_gitgutter() abort
if !get(g:, 'gitgutter_enabled', 0) || s:is_branch_empty()
return ''
endif
return GitGutterGetHunkSummary()
let hunks = GitGutterGetHunkSummary()
return hunks == [0, 0, 0] ? [] : hunks
endfunction
function! s:get_hunks_changes() abort