From efb1c8a29d3395dbeab85bda594b35e6c6803051 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sat, 22 Feb 2020 19:06:03 -0500 Subject: [PATCH] Add - map for Push header --- autoload/fugitive.vim | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index cfc5e8c..2b9d6af 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -3529,6 +3529,19 @@ function! s:DoToggleHeadHeader(value) abort call search('\C^index$', 'wc') 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 let remote = matchstr(a:heading, 'to \zs[^/]\+\ze/') if empty(remote)