Commit graph

108 commits

Author SHA1 Message Date
Andreas Schoeneck ac027a8d00 Normalize ssh+port URLs to match default style
This will make `ssh://git@<host>:<port>/<user>/<repo>` URLs
intermediately look like `git@<host>:<user>/<repo>` and
expose these to further processing/substitution.

Properties required for proper working are:
* `gitopen.gitlab.domain`
* `gitopen.gitlab.ssh.port`
2017-06-12 12:56:31 +02:00
Frank Fesevur 054772bed6 Fix trailing spaces
CI checks because of it
Leftover of #63
2017-06-01 13:01:34 +02:00
Frank Fesevur cf2c289692 Merge pull request #63 from freekmurze/master
Handle GitHub urls without the git user
2017-05-31 20:55:35 +02:00
Paul Irish 92dc862c02 correct shellcheck issues. 2017-05-29 12:41:01 -07:00
Paul Irish 75c61f13e6 Add eclint to assert editorconfig settings (#72) 2017-05-29 12:34:10 -07:00
Trent Rand 176f1b8f96 Remove username from <giturl> for BitBucket (#69)
The username prefix ‘username@bitbucket.org/*’ caused a phishing error
on Safari which persisted across page visits on BitBucket, unless the
username was manually deleted from url.
2017-05-26 19:16:03 -07:00
Martin Delille 4e3aa0ad51 Add http protocol for Gitlab custom host (#60)
* Add http protocol for Gitlab custom host

* default to https

* Revert "default to https"

This reverts commit b25190b5d1.

* Revert "Merge branch 'master' into http"

This reverts commit 18573f8b29, reversing
changes made to 88a9e254ae.

* Revert "Revert "Merge branch 'master' into http""

This reverts commit fa0e6d1f21.

* Revert "Revert "default to https""

This reverts commit d754476010.
2017-02-10 09:13:47 -08:00
Freek Van der Herten e7dc5562b7 Handle GitHub urls without the git user
In my ssh config if specified that all connections with github.com should use the `git` user. So when cloning a repo I can type:
```bash
git clone github.com:paulirish/git-open.git
``` 
instead of
```bash
git clone git@github.com:paulirish/git-open.git
``` 

This PR contains a fix for repos that have been cloned without specifying the `git` user.
2017-01-04 16:03:51 +01:00
Paul Irish 197648315b Merge pull request #56 from elim/feature/separate-url-gitlab
Supports separate URLs in the repo and the web
2017-01-03 16:19:24 -08:00
Takeru Naito 7ac4f71f42
Change the option names for GitLab 2016-11-19 23:03:57 +09:00
b4b4r07 cb4d833644 Replace exit 0 with exit $? 2016-11-13 01:51:40 +09:00
Takeru Naito 1808e612c5
Supports separate URLs in the repo and the web
On a GitLab server.

ex.
---

repo: git@git.example.com:namespace/project.git
web:  https://gitlab.example.com/namespace/project

$ git config gitopen.gitlab.domain gitlab.example.com
$ git config gitopen.gitlab.ssh-domain git.example.com
$ git open
2016-11-04 19:03:51 +09:00
Frank Fesevur 36f9a77956 Handle GitLab's default SSH notation
On GitLab the default SSH style is like git@gitlab.example.com:user/repo
Now it recognizes this format as well on your own GitLab installation.
2016-10-27 14:01:14 +02:00
Paul Irish 485bb31427 Merge pull request #51 from evoactivity/patch-1
Handle gitlab using SSH remote URL
2016-08-15 19:39:55 -07:00
Paul Irish afd7fee2b2 Merge pull request #49 from neoascetic/patch-1
Fix gist opening
2016-08-15 19:26:09 -07:00
Liam Potter 6f07f14de5 Handle gitlab using SSH remote URL
You need to add another config option to remove the port, but this is now working for me. Could be improved by adding an option for the protocol as well, I'm using `http` instead of `https`, I've left that as is for now though.
2016-08-15 13:19:17 +01:00
Karl Horky abc2c0aa26 Pedantically uppercase characters 2016-08-12 18:56:55 +02:00
Pavel Puchkin 730aea638e Fix gist opening 2016-08-12 09:50:18 +03:00
kyuden 2f190289a4 Output as standard error 2016-08-12 03:05:29 +09:00
kyuden e93db94020 Exit as naming error about branch of issue 2016-08-12 02:56:41 +09:00
kangaroo5383 c5ec7264a8 Easily track and open the relevant github issue via branch naming convention (#46)
* Open issue using ‘git open issue’
* Update doc to reflect new functionality
2016-08-05 15:38:03 -07:00
Karsten Müller b7891d5e3a added windows powershell 2016-08-05 15:14:59 +02:00
Nils Winkler aa0f9642db Atlassian Stash has been renamed to Bitbucket Server
Adjusted readme and comments in code
2016-07-12 10:38:31 +02:00
Lilian Besson c2e65077f4 It works with both types of URL now
It works with either ``ssh://git@bitbucket.org/user/repo.git`` or ``ssh://git@bitbucket.org:user/repo.git``.
2016-07-08 18:44:35 +02:00
Lilian Besson f79712de8b Better handling of SSH protocol for Bitbucket 2016-07-08 17:32:57 +02:00
Lilian Besson 421888c04a Convert ssh:// link to a https:// one
The script was failing on a Bitbucket repo using ssh instead of https. Now it should be fixed.
2016-07-08 13:07:48 +02:00
oluckyman 040ee55aa7 Add support for repos cloned via SSH 2015-08-25 20:02:04 +02:00
David O'Trakoun b62ca9a09f open src to current path 2015-05-09 01:31:24 -04:00
David O'Trakoun 88ce0da6d8 portability updates - use user specified BROWSER if available, use user's env set bash (e.g. if they use brew bash instead of OSX bash) 2015-05-09 01:26:44 -04:00
David O'Trakoun 9fa1918f42 rev parse is useless 2015-05-09 01:22:18 -04:00
David O'Trakoun c9ef8a28c4 open bitbucket on source view 2015-05-09 01:18:18 -04:00
Paul Irish 7994d2ef5d followup on #24 2015-05-02 01:58:39 -07:00
Paul Irish 401267b0da Merge pull request #24 from johanhermansson/feat-hashurl-fix
Make hash character url friendly
2015-05-02 01:56:14 -07:00
Paul Irish fac3ad3a71 gist support. fixes #22. 2015-05-01 17:48:29 -07:00
Johan Hermansson 18a1dd3600 One-liner 2015-04-27 18:29:29 +02:00
Johan Hermansson 0e2f426088 One liner? 2015-04-27 18:18:16 +02:00
Johan Hermansson 9a5d0e2c20 Makes % character url friendly 2015-02-26 16:30:52 +01:00
Johan Hermansson 9a7e2fedf3 Make hash character url friendly 2015-02-24 15:15:13 +01:00
Paul Irish ec21f8abac merge cleanup. 2015-02-23 16:24:49 -08:00
Paul Irish d8bfad3840 simplify gitlab. 2015-02-23 16:21:43 -08:00
Brent Beardsley cba1cebfe4 merge open case stmt 2015-02-23 16:21:43 -08:00
Brent Beardsley 28b9a2e858 simplified the open command by using a case stmt 2015-02-23 16:20:19 -08:00
Brent Beardsley b81a0014dd Add support for self-hosted Gitlab. Fixes #8. 2015-02-23 16:20:19 -08:00
Nils Winkler 5046786893 Added support for Atlassian Stash.
Stash remote URLs always contain /scm/, I'm using that to detect a repo
hosted on Stash. The web URL for Stash repos is using a different
format, where it inserts "projects" and "repos" to separate the project
and the repo.

I had to move the branch detection to the top, since Stash is using a
different format for selecting the branch.

I've only tried this with HTTPS URLs, not with git: URLs - there's
probably some more code needed for this.
2015-02-05 14:21:11 +01:00
Brent Beardsley 830af3263d use start on msys-git and cygstart on cygwin 2015-02-04 13:33:16 -07:00
Brent Beardsley d4c845289a support cygwin/msys-git 2015-02-04 11:15:30 -07:00
Francesc Rosas 516ed8b881 Replace sed by --short 2015-02-03 00:08:03 +00:00
Paul Irish 2d1e41d99a Pipe stdout and stderr to /dev/null
thx @mslinn . fixes #11
2015-02-02 15:46:37 -08:00
Jens Aronsson 353390eb4b Updated bitbucket url.
Bitbucket repo url doesn't use "/tree" but "/branch" instead.
2015-02-02 23:49:42 +01:00
Paul Irish 7414df1aa6 Merge pull request #4 from RedWolves/issue-2-bitbucket
Added support for bitbucket
2015-02-02 10:01:27 -08:00
Paul Irish 4ca56753ae Merge pull request #6 from eush77/true-output
Discard git-rev-parse's output
2015-02-02 10:01:22 -08:00
Eugene Sharygin 3e4858b1a2 Discard git-rev-parse's output 2015-02-01 12:50:56 +03:00
Eugene Sharygin 26ead23b2c Set /bin/bash as the interpreter 2015-02-01 12:40:37 +03:00
Ralph Whitbeck 6101e0a5ed Added support for bitbucket, ref gh-2 2015-01-24 21:35:37 -05:00
Paul Irish f247c48c78 linux support. fixes #1 2015-01-24 14:22:12 -08:00
Paul Irish d63e5c56f8 link to url 2015-01-24 14:17:10 -08:00
Paul Irish 26d6f093ae code comments. 2015-01-24 13:34:36 -08:00
Paul Irish ed88ae5cf3 now available at git open. Boom. 2015-01-24 13:34:07 -08:00
Renamed from gh.sh (Browse further)