diff --git a/autoload/magit/git.vim b/autoload/magit/git.vim index b3fb1555257e6ff39ff0fb2c42c64511e8cbe402..f5f9892553b8beeca44bff86d410aa2622b776b0 100644 --- a/autoload/magit/git.vim +++ b/autoload/magit/git.vim @@ -52,9 +52,9 @@ function! magit#git#is_work_tree(path) try call magit#utils#chdir(a:path) 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 ( executable("cygpath") ) + let top_dir = magit#utils#strip(system("cygpath " . top_dir)) + endif if ( v:shell_error != 0 ) return '' endif @@ -75,10 +75,10 @@ function! magit#git#set_top_dir(path) let top_dir=magit#utils#strip( \ system(g:magit_git_cmd . " rev-parse --show-toplevel")) . "/" 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 + 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' call magit#sys#print_shell_error() throw 'set_top_dir_error'