add -- for seperating options from filenames
This commit is contained in:
parent
aefd88057e
commit
7795027156
@ -236,7 +236,7 @@ function! s:diff_get(path) abort
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if executable('hg')
|
if executable('hg')
|
||||||
let diff = system('hg diff --nodates -U0 '. a:path .' | grep "^@@ "')
|
let diff = system('hg diff --nodates -U0 -- '. a:path .' | grep "^@@ "')
|
||||||
if !v:shell_error
|
if !v:shell_error
|
||||||
return diff
|
return diff
|
||||||
endif
|
endif
|
||||||
@ -244,14 +244,14 @@ function! s:diff_get(path) abort
|
|||||||
|
|
||||||
if executable('diff')
|
if executable('diff')
|
||||||
if executable('svn')
|
if executable('svn')
|
||||||
let diff = system('svn diff --diff-cmd diff -x -U0 '. a:path .' | grep "^@@ "')
|
let diff = system('svn diff --diff-cmd diff -x -U0 -- '. a:path .' | grep "^@@ "')
|
||||||
if !v:shell_error
|
if !v:shell_error
|
||||||
return diff
|
return diff
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if executable('bzr')
|
if executable('bzr')
|
||||||
let diff = system('bzr diff --using diff --diff-options=-U0 '. a:path .' | grep "^@@ "')
|
let diff = system('bzr diff --using diff --diff-options=-U0 -- '. a:path .' | grep "^@@ "')
|
||||||
if !v:shell_error
|
if !v:shell_error
|
||||||
return diff
|
return diff
|
||||||
endif
|
endif
|
||||||
@ -260,7 +260,7 @@ function! s:diff_get(path) abort
|
|||||||
if executable('darcs')
|
if executable('darcs')
|
||||||
let orig_dir = getcwd()
|
let orig_dir = getcwd()
|
||||||
exe 'cd '. fnamemodify(a:path, ':h')
|
exe 'cd '. fnamemodify(a:path, ':h')
|
||||||
let diff = system('darcs diff --no-pause-for-gui --diff-command="diff -U0 %1 %2" '. a:path .' | grep "^@@ "')
|
let diff = system('darcs diff --no-pause-for-gui --diff-command="diff -U0 %1 %2" -- '. a:path .' | grep "^@@ "')
|
||||||
if !v:shell_error
|
if !v:shell_error
|
||||||
exe 'cd '. orig_dir
|
exe 'cd '. orig_dir
|
||||||
return diff
|
return diff
|
||||||
@ -271,7 +271,7 @@ function! s:diff_get(path) abort
|
|||||||
|
|
||||||
if exists('g:signify_enable_cvs') && (g:signify_enable_cvs == 1)
|
if exists('g:signify_enable_cvs') && (g:signify_enable_cvs == 1)
|
||||||
if executable('cvs')
|
if executable('cvs')
|
||||||
let diff = system('cvs diff -U0 '. a:path .' 2>&1 | grep "^@@ "')
|
let diff = system('cvs diff -U0 -- '. a:path .' 2>&1 | grep "^@@ "')
|
||||||
if !v:shell_error
|
if !v:shell_error
|
||||||
return diff
|
return diff
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user