mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-12 13:23:52 -05:00
Include refs/heads in constructed push commands
Also swap out :Gpush for :Git push while we are at it.
This commit is contained in:
@@ -3530,7 +3530,7 @@ function! s:DoStageUnpushedHeading(heading) abort
|
|||||||
let remote = '.'
|
let remote = '.'
|
||||||
endif
|
endif
|
||||||
let branch = matchstr(a:heading, 'to \%([^/]\+/\)\=\zs\S\+')
|
let branch = matchstr(a:heading, 'to \%([^/]\+/\)\=\zs\S\+')
|
||||||
call feedkeys(':Gpush ' . remote . ' ' . 'HEAD:' . branch)
|
call feedkeys(':Git push ' . remote . ' ' . 'HEAD:' . 'refs/heads/' . branch)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:DoToggleUnpushedHeading(heading) abort
|
function! s:DoToggleUnpushedHeading(heading) abort
|
||||||
@@ -3543,7 +3543,7 @@ function! s:DoStageUnpushed(record) abort
|
|||||||
let remote = '.'
|
let remote = '.'
|
||||||
endif
|
endif
|
||||||
let branch = matchstr(a:record.heading, 'to \%([^/]\+/\)\=\zs\S\+')
|
let branch = matchstr(a:record.heading, 'to \%([^/]\+/\)\=\zs\S\+')
|
||||||
call feedkeys(':Gpush ' . remote . ' ' . a:record.commit . ':' . branch)
|
call feedkeys(':Git push ' . remote . ' ' . a:record.commit . ':' . 'refs/heads/' . branch)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:DoToggleUnpushed(record) abort
|
function! s:DoToggleUnpushed(record) abort
|
||||||
@@ -3551,7 +3551,7 @@ function! s:DoToggleUnpushed(record) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:DoUnstageUnpulledHeading(heading) abort
|
function! s:DoUnstageUnpulledHeading(heading) abort
|
||||||
call feedkeys(':Grebase')
|
call feedkeys(':Git rebase')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:DoToggleUnpulledHeading(heading) abort
|
function! s:DoToggleUnpulledHeading(heading) abort
|
||||||
@@ -3559,7 +3559,7 @@ function! s:DoToggleUnpulledHeading(heading) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:DoUnstageUnpulled(record) abort
|
function! s:DoUnstageUnpulled(record) abort
|
||||||
call feedkeys(':Grebase ' . a:record.commit)
|
call feedkeys(':Git rebase ' . a:record.commit)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:DoToggleUnpulled(record) abort
|
function! s:DoToggleUnpulled(record) abort
|
||||||
@@ -3567,7 +3567,7 @@ function! s:DoToggleUnpulled(record) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:DoUnstageUnpushed(record) abort
|
function! s:DoUnstageUnpushed(record) abort
|
||||||
call feedkeys(':Grebase --autosquash ' . a:record.commit . '^')
|
call feedkeys(':Git rebase --autosquash ' . a:record.commit . '^')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:DoToggleStagedHeading(...) abort
|
function! s:DoToggleStagedHeading(...) abort
|
||||||
|
|||||||
Reference in New Issue
Block a user