Commit Graph

52 Commits

Author SHA1 Message Date
Tim Pope
b3bf811ba9 Remove old lowercase API
I don't think this was ever official, so no need to have a formal
deprecation cycle.
2023-03-29 07:38:22 -04:00
Frederick Zhang
ee69335de1 Use ?plain=1 for range links to GitHub markups
GitHub markups are by default rendered by [1], which doesn't map
original line anchors into the previews.

[1] https://github.com/github/markup
2023-03-29 06:22:13 -04:00
Tim Pope
cad60fe382 Fix display of omnicomplete server error message 2022-07-27 09:17:04 -04:00
Tim Pope
09b9b1ca86 Fix error reporting during omnicomplete
Resolves: https://github.com/tpope/vim-rhubarb/issues/70
2022-07-08 04:16:50 -04:00
Tim Pope
c815057f8e Abstract check for .git/refs/ path 2022-06-29 22:24:47 -04:00
Tim Pope
dcff4d605c Leverage complete_add()
I was moving in the direction of using an asynchronous callback before
deciding it didn't actually add much.  But getting rid of that map()
string still feels like an improvement.
2022-06-15 16:38:00 -04:00
Tim Pope
f8b70f5ef3 Remove special case for empty response body
Not sure if this served a purpose, so let's find out.
2022-06-15 16:10:14 -04:00
Tim Pope
2f1a84f0d6 Support callback_args in request functions 2022-06-15 16:10:14 -04:00
Tim Pope
ab0d42bb31 Remove admin URL special case
This was cute, but not very useful, and could create confusion when used
on a repository without admin privileges.
2022-05-11 02:14:21 -04:00
Tim Pope
977b3ccbad Use FugitiveExecute() to call curl if available
I'm not in love with this API, so intercept any "I changed my mind"
exception and fall back to system().
2021-09-13 15:45:42 -04:00
Tim Pope
82e71b150d Allow dictionary to specify enterprise URLs
References: https://github.com/shumphrey/fugitive-gitlab.vim/issues/34
2021-08-31 07:52:37 -04:00
Tim Pope
240597394e Provide simple callback API for requests 2021-08-26 07:15:08 -04:00
Tim Pope
e804fb67b7 Remove ancient guard against legacy 'commit' parameter
People often copy and paste this plugin as a starting point for their
own, so let's clean this up.
2021-08-21 14:14:25 -04:00
Tim Pope
b4aad6dc43 Support ssh.github.com
Let's use this opportunity to throw out the old, contorted regexp
builder and start over.

Resolves: https://github.com/tpope/vim-rhubarb/issues/65
2021-07-16 01:03:07 -04:00
Tim Pope
42e9ee3f95 Drop support for Fugitive older than 3.0
There was a bug here anyways in the use of b:git_dir instead of
l:git_dir.
2021-04-12 13:11:23 -04:00
Tim Pope
1c36bf8668 Sanity check line number fields 2021-04-04 20:46:51 -04:00
Tim Pope
71d5c3598e Switch from FugitiveConfig() to FugitiveConfigGet() 2021-04-03 19:55:34 -04:00
Tim Pope
3d444b5b4f Don't show v:null in preview window 2021-03-15 23:41:40 -04:00
Tim Pope
af12af412d Replace :Gbrowse with :GBrowse 2021-02-11 16:19:12 -05:00
Gordon Fontenot
d865e427d0 Add support for enterprise cloud accounts
GitHub Enterprise Cloud accounts use a slightly different URL scheme,
using org-\d+@github.com instead of git@ or ssh@ (or any of the other
supported variations). This adds support for urls with that format to
the base pattern matching so that users with enterprise cloud accounts
can use vim-rhubarb as expected.
2020-12-17 19:49:54 -05:00
Tim Pope
0eaa213f01 Handle trailing slash in enterprise URL 2020-04-08 07:20:10 -04:00
Tim Pope
5130596a65 Use FugitiveConfig() to retrieve config vars 2019-11-12 18:54:46 -05:00
Tim Pope
75ad917e49 Eliminate hard coded a:opts parameter
This is a bit preemptive refactoring to enable passing a second
parameter to force plain http.
2019-09-02 16:30:05 -04:00
John O'Shea
70713ca031 Add support for private repositories
Private, non-Enterprise, GitHub repos are hosted on github.com but
use usernames that aren't 'git@...'
2019-04-24 13:26:15 -04:00
Keith Smiley
57a350e632 Strip trailing slashes from URLs
Previously if you had a remote in the format:

https://github.com/owner/repo/

When using Gbrowse from fugitive, there would be double slashes in the
opened URL:

https://github.com/owner/repo//blob/master/README.md

This caused GitHub not to show a preview of the lines inline if you
posted it in a comment. This change strips the trailing slash if it
exists.
2019-03-20 15:54:37 -04:00
Nino Annighofer
42072cc349 Escape hash-mark in Gbrowse URL
This won't break line-highlighting as discussed here:
https://github.com/tpope/vim-rhubarb/pull/20#issuecomment-366482507
2018-10-31 14:28:00 -04:00
Tim Pope
b6cbbb0ad3 Use camel case for public functions 2018-08-22 18:39:08 -04:00
Tim Pope
6c529de83c Don't error on omnicomplete in non-GitHub repository
Closes https://github.com/tpope/vim-rhubarb/issues/30
2018-08-06 11:05:37 -04:00
Tim Pope
8a4ced4f00 Swap in alternative API 2018-07-22 17:10:02 -04:00
Tim Pope
848841083d Ask Fugitive directly for the remote URL 2018-07-21 17:46:31 -04:00
Tim Pope
186bf27e05 Remove dependency on repo in :Gbrowse 2018-07-19 00:43:15 -04:00
Tim Pope
3f10dff8cf Ignore Fugitive browse requests without commits
This should never happen.
2018-06-25 18:21:57 -04:00
Tim Pope
658f51d366 Don't try to resolve tracked branch
Fugitive does this for us.
2018-06-25 18:08:27 -04:00
Tim Pope
135aeb6b5f Tighten loose regexp 2018-06-25 17:27:42 -04:00
Tim Pope
ecefe85ac5 Fix linting issue 2018-05-29 19:11:38 -04:00
Tim Pope
6caad2b61a Fix throw in issues completion
Closes https://github.com/tpope/vim-rhubarb/issues/23
2017-06-28 16:08:11 -04:00
Tim Pope
f7c4a493e6 Use completion base text for issue search 2017-06-07 22:19:51 -04:00
Tim Pope
4c1fcb5d16 More versatile API URL generation 2017-06-07 19:11:37 -04:00
Tim Pope
5b883e14ff Use native json support when available 2017-06-07 18:50:58 -04:00
Dominic Monroe
9032c184f8 Add ssh://git@ to origin url base (#16) 2017-04-10 13:21:55 -04:00
Justin M. Keyes
8620dc1277 curl: win32: Also try ~/.netrc
Closes https://github.com/tpope/vim-rhubarb/issues/11
2016-01-08 14:28:42 -05:00
Tim Pope
715789e554 Update for forthcoming :Gbrowse handler changes 2015-12-26 14:41:51 -05:00
Tim Pope
5e4f174d82 Experiment: Always use SHA in :Gbrowse
I've been holding out on this forever because links to the latest are
occasionally useful, but more often than not, a permanent link to the
file as it currently stands is most useful.  At any rate, it shouldn't
be Rhubarb's job to parse out the branch name.
2015-12-01 19:05:00 -05:00
Tim Pope
c6c6f4bbf3 Future proofing 2015-12-01 19:03:49 -05:00
Tim Pope
ba6057c101 Tighten handling of refs in :Gbrowse 2015-12-01 18:55:13 -05:00
Tim Pope
ade3d07374 Fix mis-paste 2015-12-01 17:10:42 -05:00
Tim Pope
7ce3d67750 Fix :Gbrowse
Closes #8
2015-12-01 14:59:08 -05:00
Tim Pope
6d75255999 Open release page for tags on GitHub 2015-12-01 04:24:44 -05:00
Tim Pope
28c489579f Add another guard to :Gbrowse support
Now that I've actually had time to assess things, it's clear this
parameter is only used as a way to convey the branch name and makes zero
sense.  So, it's going to get dropped sooner or later.
2015-12-01 03:34:10 -05:00
Tim Pope
540b2b6c4b Support for :Gbrowse 2015-11-30 22:12:06 -05:00