mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-14 22:33:51 -05:00
Recover from deleted temp script
Closes https://github.com/tpope/vim-fugitive/issues/1616
This commit is contained in:
@@ -146,11 +146,13 @@ endif
|
||||
function! s:TempScript(...) abort
|
||||
let body = join(a:000, "\n")
|
||||
if !has_key(s:temp_scripts, body)
|
||||
let temp = tempname() . '.sh'
|
||||
call writefile(['#!/bin/sh'] + a:000, temp)
|
||||
let s:temp_scripts[body] = temp
|
||||
let s:temp_scripts[body] = tempname() . '.sh'
|
||||
endif
|
||||
return FugitiveGitPath(s:temp_scripts[body])
|
||||
let temp = s:temp_scripts[body]
|
||||
if !filereadable(temp)
|
||||
call writefile(['#!/bin/sh'] + a:000, temp)
|
||||
endif
|
||||
return FugitiveGitPath(temp)
|
||||
endfunction
|
||||
|
||||
function! s:DoAutocmd(cmd) abort
|
||||
|
||||
Reference in New Issue
Block a user