From 8820f3f89c9490ca2507c9c969ca10fe46b7b37e Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sat, 24 Jul 2021 07:53:57 -0400 Subject: [PATCH] Document FugitiveRemoteUrl() --- plugin/fugitive.vim | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 603292d..fa14275 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -160,6 +160,13 @@ function! FugitiveConfigGetRegexp(pattern, ...) abort return call('fugitive#ConfigGetRegexp', [a:pattern] + a:000) endfunction +" FugitiveRemoteUrl() retrieves the remote URL for the given remote name, +" defaulting to the current branch's remote or "origin" if no argument is +" given. Similar to `git remote get-url`, but also attempts to resolve HTTP +" redirects and SSH host aliases. +" +" An optional second argument provides the Git dir, or the buffer number of a +" buffer with a Git dir. The default is the current buffer. function! FugitiveRemoteUrl(...) abort return fugitive#RemoteUrl(a:0 ? a:1 : '', FugitiveGitDir(a:0 > 1 ? a:2 : -1), a:0 > 2 ? a:3 : 0) endfunction