mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-10 20:43:46 -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
|
||||
let cdback = s:Cd(tree)
|
||||
if s:winshell()
|
||||
let command = ''
|
||||
let old_editor = $GIT_EDITOR
|
||||
let $GIT_EDITOR = 'false'
|
||||
let command = 'set GIT_EDITOR=false & '
|
||||
else
|
||||
let command = 'env GIT_EDITOR=false '
|
||||
endif
|
||||
@@ -2743,9 +2741,6 @@ function! s:CommitCommand(line1, line2, range, count, bang, mods, reg, arg, args
|
||||
catch /^fugitive:/
|
||||
return 'echoerr ' . string(v:exception)
|
||||
finally
|
||||
if exists('old_editor')
|
||||
let $GIT_EDITOR = old_editor
|
||||
endif
|
||||
call delete(outfile)
|
||||
call delete(errorfile)
|
||||
endtry
|
||||
|
||||
Reference in New Issue
Block a user