diff --git a/README.markdown b/README.markdown index d36bdb3..e055153 100644 --- a/README.markdown +++ b/README.markdown @@ -6,6 +6,9 @@ of features: * Enables `:Gbrowse` from fugitive.vim to open GitHub URLs. (`:Gbrowse` currently has native support for this, but it is slated to be removed.) +* Sets up `:Git` to use [`hub`](https://github.com/github/hub) if installed + rather than `git`. + * In commit messages, GitHub issues, issue URLs, and collaborators can be omni-completed (``, see `:help compl-omni`). This makes inserting those `Closes #123` remarks slightly easier than copying and pasting from diff --git a/plugin/rhubarb.vim b/plugin/rhubarb.vim index a4fa710..15584eb 100644 --- a/plugin/rhubarb.vim +++ b/plugin/rhubarb.vim @@ -11,6 +11,10 @@ if !exists('g:dispatch_compilers') endif let g:dispatch_compilers['hub'] = 'git' +if get(g:, 'fugitive_git_command', 'git') ==# 'git' && executable('hub') + let g:fugitive_git_command = 'hub' +endif + function! s:config() abort let common_dir = fugitive#buffer().repo().dir('commondir') if filereadable(common_dir)