Restore "hub" support using g:fugitive_git_command

This commit is contained in:
Tim Pope
2017-04-11 18:57:03 -04:00
parent 563daee79a
commit 925dec7ee7
2 changed files with 7 additions and 0 deletions

View File

@@ -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 (`<C-X><C-O>`, see `:help compl-omni`). This makes inserting
those `Closes #123` remarks slightly easier than copying and pasting from

View File

@@ -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)