mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-11 12:53:52 -05:00
Eliminate environment juggling in :Gcommit
This commit is contained in:
@@ -2681,9 +2681,7 @@ function! s:CommitCommand(line1, line2, range, count, bang, mods, reg, arg, args
|
|||||||
endif
|
endif
|
||||||
let cdback = s:Cd(tree)
|
let cdback = s:Cd(tree)
|
||||||
if s:winshell()
|
if s:winshell()
|
||||||
let command = ''
|
let command = 'set GIT_EDITOR=false & '
|
||||||
let old_editor = $GIT_EDITOR
|
|
||||||
let $GIT_EDITOR = 'false'
|
|
||||||
else
|
else
|
||||||
let command = 'env GIT_EDITOR=false '
|
let command = 'env GIT_EDITOR=false '
|
||||||
endif
|
endif
|
||||||
@@ -2743,9 +2741,6 @@ function! s:CommitCommand(line1, line2, range, count, bang, mods, reg, arg, args
|
|||||||
catch /^fugitive:/
|
catch /^fugitive:/
|
||||||
return 'echoerr ' . string(v:exception)
|
return 'echoerr ' . string(v:exception)
|
||||||
finally
|
finally
|
||||||
if exists('old_editor')
|
|
||||||
let $GIT_EDITOR = old_editor
|
|
||||||
endif
|
|
||||||
call delete(outfile)
|
call delete(outfile)
|
||||||
call delete(errorfile)
|
call delete(errorfile)
|
||||||
endtry
|
endtry
|
||||||
|
|||||||
Reference in New Issue
Block a user