Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
vimagit
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
jreybert
vimagit
Commits
3cea54ac
Commit
3cea54ac
authored
8 years ago
by
Jerome Reybert
Browse files
Options
Downloads
Patches
Plain Diff
autoload/magit/utils.vim,plugin/magit.vim: escape dirs while chdir (fix #89)
parent
d1c75449
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
autoload/magit/utils.vim
+5
-5
5 additions, 5 deletions
autoload/magit/utils.vim
plugin/magit.vim
+1
-1
1 addition, 1 deletion
plugin/magit.vim
with
6 additions
and
6 deletions
autoload/magit/utils.vim
+
5
−
5
View file @
3cea54ac
...
@@ -25,7 +25,7 @@ endfunction
...
@@ -25,7 +25,7 @@ endfunction
let
s:magit_cd_cmd
=
exists
(
'*haslocaldir'
)
&&
haslocaldir
()
?
'lcd '
:
'cd '
let
s:magit_cd_cmd
=
exists
(
'*haslocaldir'
)
&&
haslocaldir
()
?
'lcd '
:
'cd '
" magit#utils#lcd: helper function to lcd. use cd if lcd doesn't exists
" magit#utils#lcd: helper function to lcd. use cd if lcd doesn't exists
function
!
magit#utils#
lcd
(
dir
)
function
!
magit#utils#
lcd
(
dir
)
execute
s:magit_cd_cmd
.
a:dir
execute
s:magit_cd_cmd
.
fnameescape
(
a:dir
)
endfunction
endfunction
" magit#utils#clear_undo: this function clear local undo history.
" magit#utils#clear_undo: this function clear local undo history.
...
@@ -55,7 +55,7 @@ endfunction
...
@@ -55,7 +55,7 @@ endfunction
function
!
magit#utils#
system
(...)
function
!
magit#utils#
system
(...)
let
dir
=
getcwd
()
let
dir
=
getcwd
()
try
try
execute
s:magit_cd_cmd
.
magit#git#top_dir
()
call
magit#utils#
lcd
(
magit#git#top_dir
()
)
" List as system() input is since v7.4.247, it is safe to check
" List as system() input is since v7.4.247, it is safe to check
" systemlist, which is sine v7.4.248
" systemlist, which is sine v7.4.248
if
exists
(
'*systemlist'
)
if
exists
(
'*systemlist'
)
...
@@ -75,7 +75,7 @@ function! magit#utils#system(...)
...
@@ -75,7 +75,7 @@ function! magit#utils#system(...)
endif
endif
endif
endif
finally
finally
execute
s:magit_cd_cmd
.
dir
call
magit#utils#
lcd
(
dir
)
endtry
endtry
endfunction
endfunction
...
@@ -88,7 +88,7 @@ endfunction
...
@@ -88,7 +88,7 @@ endfunction
function
!
magit#utils#
systemlist
(...)
function
!
magit#utils#
systemlist
(...)
let
dir
=
getcwd
()
let
dir
=
getcwd
()
try
try
execute
s:magit_cd_cmd
.
magit#git#top_dir
()
call
magit#utils#
lcd
(
magit#git#top_dir
()
)
" systemlist since v7.4.248
" systemlist since v7.4.248
if
exists
(
'*systemlist'
)
if
exists
(
'*systemlist'
)
return
call
(
'systemlist'
,
a:000
)
return
call
(
'systemlist'
,
a:000
)
...
@@ -96,7 +96,7 @@ function! magit#utils#systemlist(...)
...
@@ -96,7 +96,7 @@ function! magit#utils#systemlist(...)
return
split
(
call
(
'magit#utils#system'
,
a:000
),
'\n'
)
return
split
(
call
(
'magit#utils#system'
,
a:000
),
'\n'
)
endif
endif
finally
finally
execute
s:magit_cd_cmd
.
dir
call
magit#utils#
lcd
(
dir
)
endtry
endtry
endfunction
endfunction
...
...
This diff is collapsed.
Click to expand it.
plugin/magit.vim
+
1
−
1
View file @
3cea54ac
...
@@ -778,7 +778,7 @@ function! magit#show_magit(display, ...)
...
@@ -778,7 +778,7 @@ function! magit#show_magit(display, ...)
throw
'magit_not_in_git_repo'
throw
'magit_not_in_git_repo'
endif
endif
let
buffer_name
=
'magit://'
.
git_dir
let
buffer_name
=
fnameescape
(
'magit://'
.
git_dir
)
let
magit_win
=
magit#utils#search_buffer_in_windows
(
buffer_name
)
let
magit_win
=
magit#utils#search_buffer_in_windows
(
buffer_name
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment