diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 081dfa7..99b643e 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -634,7 +634,7 @@ function! s:buffer(...) abort if buffer.getvar('git_dir') !=# '' return buffer endif - call s:throw('not a git repository: '.expand('%:p')) + call s:throw('not a git repository: '.bufname(buffer['#'])) endfunction function! fugitive#buffer(...) abort @@ -1239,7 +1239,14 @@ function! s:Commit(mods, args, ...) abort let args = a:args let args = s:gsub(args,'%(%(^| )-- )@'