mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-08 11:33:47 -05:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea7b1ab602 | ||
|
|
aaf5b34366 | ||
|
|
05000b1872 |
@@ -574,7 +574,7 @@ function! s:StageDiff(...) abort
|
||||
return 'Git diff --cached'
|
||||
elseif filename ==# ''
|
||||
return 'Git diff'
|
||||
elseif line =~# '^#\trenamed:' && filename =~ ' -> '
|
||||
elseif line =~# '^#\t\%(renamed\|copied\):' && filename =~ ' -> '
|
||||
let [old, new] = split(filename,' -> ')
|
||||
execute 'Gedit '.s:fnameescape(':0:'.new)
|
||||
return cmd.' HEAD:'.s:fnameescape(old)
|
||||
@@ -632,7 +632,7 @@ function! s:StageToggle(lnum1,lnum2) abort
|
||||
let cmd = ['mv','--'] + reverse(split(filename,' -> '))
|
||||
let filename = cmd[-1]
|
||||
elseif section =~? ' to be '
|
||||
let cmd = ['reset','-q','--',filename]
|
||||
let cmd = ['reset','-q','--',split(filename,' -> ')[-1]]
|
||||
elseif line =~# '^#\tdeleted:'
|
||||
let cmd = ['rm','--',filename]
|
||||
else
|
||||
@@ -728,11 +728,11 @@ function! s:Commit(args) abort
|
||||
endif
|
||||
let command .= s:repo().git_command('commit').' '.a:args
|
||||
if &shell =~# 'csh'
|
||||
silent execute '!('.command.' > '.outfile.') >& '.errorfile
|
||||
call system('('.command.' > '.outfile.') >& '.errorfile)
|
||||
elseif a:args =~# '\%(^\| \)--interactive\>'
|
||||
execute '!'.command.' 2> '.errorfile
|
||||
call system(command.' 2> '.errorfile)
|
||||
else
|
||||
silent execute '!'.command.' > '.outfile.' 2> '.errorfile
|
||||
call system(command.' > '.outfile.' 2> '.errorfile)
|
||||
endif
|
||||
if !v:shell_error
|
||||
if filereadable(outfile)
|
||||
@@ -1621,7 +1621,7 @@ function! s:ReplaceCmd(cmd,...) abort
|
||||
endif
|
||||
endif
|
||||
set noautowrite
|
||||
silent exe '!'.escape(prefix.a:cmd,'%#').' > '.tmp
|
||||
call system(prefix.a:cmd.' > '.tmp)
|
||||
finally
|
||||
let &autowrite = aw
|
||||
if exists('old_index')
|
||||
|
||||
Reference in New Issue
Block a user