Commit Graph

105 Commits

Author SHA1 Message Date
Tim Pope
5496d7c945 Always return a list from rhubarb#Complete()
Resolves: https://github.com/tpope/vim-rhubarb/issues/84
2025-06-27 19:06:00 -04:00
Tim Pope
386daa2e9d Add request is: constraint to issue search
Resolves: https://github.com/tpope/vim-rhubarb/issues/82
2025-01-16 01:00:30 -05:00
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
a0fc3c94e9 Add export-ignore gitattributes 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
75b8e01450 Tweak README to eliminate partially/partly inconsistency 2021-08-26 06:59:11 -04:00
Tim Pope
e4f7fb8a1b MIT License 2021-08-24 16:07:58 -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
6aaa229db8 Fix inclusion of trailing quote when parsing config file
This has no effect on the current behavior because we're only checking
for the presence of the URL, not actually using it.  Still, this will
prevent a bug from creeping in if rhubarb#HomepageForUrl() ever gets
more strict.
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
2590324d7f Drop use of User Fugitive autocommand 2021-04-15 15:59:13 -04:00
Tim Pope
b4081f0a88 Extract commit message setup function 2021-04-12 14:06:29 -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
964d48fd11 Drop support for hub
You can still enable this manually with

    let g:fugitive_git_command = 'hub'

But Fugitive will likely be dropping support for that in the future.
2021-02-11 16:19:12 -05: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
857865bdab Allow opt-out of hub as git
Closes https://github.com/tpope/vim-rhubarb/issues/63
2020-11-29 08:28:53 -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
d1f18371f5 Add sponsor button 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
Tim Pope
9edacf9d5b Prefer FugitiveFind() over FugitiveCommonDir()
FugitiveFind() is guaranteed to include a Vim friendly path, while
FugitiveCommonDir() currently returns a Git friendly path.  That is, the
latter uses forwards slashes even on win32, and might do something to
accommodate Cygwin.
2019-08-19 06:25:07 -04:00
Guillaume
c509c7eede Fix error message when editing a pull request 2019-06-27 12:44:55 -04:00
Matt Rogers
786d7a74ed Set a filetype only if unset or wrong
It's possible that vim's built-in will notice the comment lines and set
a filetype of `conf`. This makes using `setfiletype` impractical since
`setfiletype` does not override an already set file type.
2019-06-24 13:30:16 -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
Tim Pope
e57ed3b6be Replace FugitiveRoute() with FugitiveFind() 2018-11-16 17:35:00 -05: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
Teo Ljungberg
3a9ddb8ffa Treat files generated by hub(1) as gitcommits
- `.git/PULLREQ_EDITMSG` is generated by `hub pull-request`.
- `.git/ISSUE_EDITMSG` is generated by `hub issue create`.
- `.git/RELEASE_EDITMSG` is generated by `hub release create`.
2018-09-20 14:39:25 -04:00
Tim Pope
b6cbbb0ad3 Use camel case for public functions 2018-08-22 18:39:08 -04:00
Tim Pope
70b9cfc749 Leverage another API for getting common dir 2018-08-19 16:56:43 -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
322dd5e05f Make config file check more robust 2018-07-28 21:14:17 -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