Show stderr on :Gcommit
References https://github.com/tpope/vim-fugitive/pull/1115
This commit is contained in:
parent
d176cca5ae
commit
c33d7fcb9f
@ -2996,10 +2996,9 @@ function! s:CommitCommand(line1, line2, range, count, bang, mods, reg, arg, args
|
|||||||
redraw!
|
redraw!
|
||||||
endif
|
endif
|
||||||
if !exec_error
|
if !exec_error
|
||||||
|
echo join(errors, "\n")
|
||||||
if filereadable(outfile)
|
if filereadable(outfile)
|
||||||
for line in readfile(outfile)
|
echo join(readfile(outfile), "\n")
|
||||||
echo line
|
|
||||||
endfor
|
|
||||||
endif
|
endif
|
||||||
call fugitive#ReloadStatus(dir, 1)
|
call fugitive#ReloadStatus(dir, 1)
|
||||||
return after[1:-1]
|
return after[1:-1]
|
||||||
@ -3036,11 +3035,13 @@ function! s:CommitCommand(line1, line2, range, count, bang, mods, reg, arg, args
|
|||||||
let b:fugitive_commit_arguments = argv
|
let b:fugitive_commit_arguments = argv
|
||||||
setlocal bufhidden=wipe filetype=gitcommit
|
setlocal bufhidden=wipe filetype=gitcommit
|
||||||
return '1' . after
|
return '1' . after
|
||||||
elseif error ==# '!'
|
elseif empty(errors)
|
||||||
echo get(readfile(outfile), -1, '')
|
let out = readfile(outfile)
|
||||||
|
echo get(out, -1, '') =~# 'stash\|\d' ? get(out, -2, '') : out[-1]
|
||||||
return after[1:-1]
|
return after[1:-1]
|
||||||
else
|
else
|
||||||
call s:throw(empty(error)?join(errors, ' '):error)
|
echo join(errors, "\n")
|
||||||
|
return after[1:-1]
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
catch /^fugitive:/
|
catch /^fugitive:/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user