mirror of
https://github.com/tpope/vim-rhubarb.git
synced 2025-12-07 12:44:27 +08:00
Restore "hub" support using g:fugitive_git_command
This commit is contained in:
@@ -6,6 +6,9 @@ of features:
|
|||||||
* Enables `:Gbrowse` from fugitive.vim to open GitHub URLs. (`:Gbrowse`
|
* Enables `:Gbrowse` from fugitive.vim to open GitHub URLs. (`:Gbrowse`
|
||||||
currently has native support for this, but it is slated to be removed.)
|
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
|
* In commit messages, GitHub issues, issue URLs, and collaborators can be
|
||||||
omni-completed (`<C-X><C-O>`, see `:help compl-omni`). This makes inserting
|
omni-completed (`<C-X><C-O>`, see `:help compl-omni`). This makes inserting
|
||||||
those `Closes #123` remarks slightly easier than copying and pasting from
|
those `Closes #123` remarks slightly easier than copying and pasting from
|
||||||
|
|||||||
@@ -11,6 +11,10 @@ if !exists('g:dispatch_compilers')
|
|||||||
endif
|
endif
|
||||||
let g:dispatch_compilers['hub'] = 'git'
|
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
|
function! s:config() abort
|
||||||
let common_dir = fugitive#buffer().repo().dir('commondir')
|
let common_dir = fugitive#buffer().repo().dir('commondir')
|
||||||
if filereadable(common_dir)
|
if filereadable(common_dir)
|
||||||
|
|||||||
Reference in New Issue
Block a user