mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-12-14 07:47:13 +08:00
Add - map for Push header
This commit is contained in:
@@ -3529,6 +3529,19 @@ function! s:DoToggleHeadHeader(value) abort
|
|||||||
call search('\C^index$', 'wc')
|
call search('\C^index$', 'wc')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! s:DoStagePushHeader(value) abort
|
||||||
|
let remote = matchstr(a:value, '\zs[^/]\+\ze/')
|
||||||
|
if empty(remote)
|
||||||
|
let remote = '.'
|
||||||
|
endif
|
||||||
|
let branch = matchstr(a:value, '\%([^/]\+/\)\=\zs\S\+')
|
||||||
|
call feedkeys(':Git push ' . remote . ' ' . branch)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! s:DoTogglePushHeader(value) abort
|
||||||
|
return s:DoStagePushHeader(a:value)
|
||||||
|
endfunction
|
||||||
|
|
||||||
function! s:DoStageUnpushedHeading(heading) abort
|
function! s:DoStageUnpushedHeading(heading) abort
|
||||||
let remote = matchstr(a:heading, 'to \zs[^/]\+\ze/')
|
let remote = matchstr(a:heading, 'to \zs[^/]\+\ze/')
|
||||||
if empty(remote)
|
if empty(remote)
|
||||||
|
|||||||
Reference in New Issue
Block a user