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
3a0c9f39
Commit
3a0c9f39
authored
5 years ago
by
Paul Netherwood
Committed by
Jérôme Reybert
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Use cygpath if present to create top level dir for Cygwin/MSYS2 compatibility
parent
94762b13
Branches
Branches containing commit
Tags
Tags containing commit
Loading
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
autoload/magit/git.vim
+7
-0
7 additions, 0 deletions
autoload/magit/git.vim
with
7 additions
and
0 deletions
autoload/magit/git.vim
+
7
−
0
View file @
3a0c9f39
...
@@ -52,6 +52,9 @@ function! magit#git#is_work_tree(path)
...
@@ -52,6 +52,9 @@ function! magit#git#is_work_tree(path)
try
try
call
magit#utils#
chdir
(
a:path
)
call
magit#utils#
chdir
(
a:path
)
let
top_dir
=
system
(
g:magit_git_cmd
.
" rev-parse --show-toplevel"
)
let
top_dir
=
system
(
g:magit_git_cmd
.
" rev-parse --show-toplevel"
)
if
(
executable
(
"cygpath"
)
)
let
top_dir
=
magit#utils#strip
(
system
(
"cygpath "
.
top_dir
))
endif
if
(
v
:
shell_error
!=
0
)
if
(
v
:
shell_error
!=
0
)
return
''
return
''
endif
endif
...
@@ -72,6 +75,10 @@ function! magit#git#set_top_dir(path)
...
@@ -72,6 +75,10 @@ function! magit#git#set_top_dir(path)
let
top_dir
=
magit#utils#strip
(
let
top_dir
=
magit#utils#strip
(
\
system
(
g:magit_git_cmd
.
" rev-parse --show-toplevel"
))
.
"/"
\
system
(
g:magit_git_cmd
.
" rev-parse --show-toplevel"
))
.
"/"
let
git_dir
=
magit#utils#strip
(
system
(
g:magit_git_cmd
.
" rev-parse --git-dir"
))
.
"/"
let
git_dir
=
magit#utils#strip
(
system
(
g:magit_git_cmd
.
" rev-parse --git-dir"
))
.
"/"
if
(
executable
(
"cygpath"
)
)
let
top_dir
=
magit#utils#strip
(
system
(
"cygpath "
.
top_dir
))
let
git_dir
=
magit#utils#strip
(
system
(
"cygpath "
.
git_dir
))
endif
catch
'shell_error'
catch
'shell_error'
call
magit#sys#print_shell_error
()
call
magit#sys#print_shell_error
()
throw
'set_top_dir_error'
throw
'set_top_dir_error'
...
...
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