motiejus/dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.jakstys.lt/motiejus/dotfiles.git
Log | Tree | Refs | README | LICENSE

commit fdb57922a4d7937506232c1b64abbbfd5ee67ae9 (tree)
parent a025157c5f2132040be9914f2a56459d188ee9a7
Author: Tim Pope <code@tpope.net>
Date:   Sat,  6 Jul 2019 02:17:25 -0400

Update escaping for dynamic :Git invocations

Diffstat:
Mautoload/fugitive.vim | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim @@ -2570,12 +2570,12 @@ function! s:StageDiffEdit() abort let info = s:StageInfo(line('.')) let arg = (empty(info.paths) ? s:Tree() : info.paths[0]) if info.section ==# 'Staged' - return 'Git! diff --no-ext-diff --cached '.s:shellesc(arg) + return 'Git! diff --no-ext-diff --cached '.s:fnameescape(arg) elseif info.status ==# '?' call s:TreeChomp('add', '--intent-to-add', '--', arg) return s:ReloadStatus() else - return 'Git! diff --no-ext-diff '.s:shellesc(arg) + return 'Git! diff --no-ext-diff '.s:fnameescape(arg) endif endfunction @@ -2793,10 +2793,10 @@ function! s:StagePatch(lnum1,lnum2) abort endfor try if !empty(add) - execute "Git add --patch -- ".join(map(add,'s:shellesc(v:val)')) + execute "Git add --patch -- ".join(map(add,'s:fnameescape(v:val)')) endif if !empty(reset) - execute "Git reset --patch -- ".join(map(reset,'s:shellesc(v:val)')) + execute "Git reset --patch -- ".join(map(reset,'s:fnameescape(v:val)')) endif catch /^fugitive:/ return 'echoerr ' . string(v:exception)