Commit Graph

86 Commits

Author SHA1 Message Date
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
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
7e835bb967 Add :Gbrowse to documentation 2018-06-02 18:12:52 -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
Tim Pope
feac2474db Remove reference to transitional :Gbrowse support 2017-05-23 18:01:41 -04:00
Tim Pope
9792526427 Update instructions for API access 2017-05-23 15:05:37 -04:00
Tim Pope
925dec7ee7 Restore "hub" support using g:fugitive_git_command 2017-05-23 14:47:17 -04:00
Lucas Caton
563daee79a Replace OS X with macOS in README 2017-05-08 11:28:49 -04:00
Dominic Monroe
9032c184f8 Add ssh://git@ to origin url base (#16) 2017-04-10 13:21:55 -04:00
Nate Jones
0c12c7ed7c Find proper config when running in worktree (#14)
Check if in worktree (by checking for a 'commondir' file) and using that
to find the parent config.  Otherwise just use the config in .git.

closes #13
2016-06-17 15:19:42 -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
776689794c Actually drop hub support
References https://github.com/tpope/vim-rhubarb/issues/9
2015-12-08 12:28:54 -05:00
Tim Pope
c175c71850 Drop hub support due to lack of --exec-path
Closes https://github.com/tpope/vim-rhubarb/issues/9
2015-12-07 01:36:37 -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