Normalize path before quoting it

This commit is contained in:
Tim Pope
2024-05-17 12:59:54 -04:00
parent 10fb874d7e
commit a0b0c1ddc1

View File

@@ -273,10 +273,11 @@ function! s:TempScript(...) abort
if !filereadable(temp) if !filereadable(temp)
call writefile(['#!/bin/sh'] + a:000, temp) call writefile(['#!/bin/sh'] + a:000, temp)
endif endif
let temp = FugitiveGitPath(temp)
if temp =~# '\s' if temp =~# '\s'
let temp = '"' . temp . '"' let temp = '"' . temp . '"'
endif endif
return FugitiveGitPath(temp) return temp
endfunction endfunction
function! s:DoAutocmd(...) abort function! s:DoAutocmd(...) abort