Граф коммитов

25 Коммитов

Автор SHA1 Сообщение Дата
Mislav Marohnić a64f9d5939 Switch to "the output should not contain anything" built-in step 2019-08-21 18:23:50 +02:00
Tomas Edwardsson e1fe86ffbc Add clipboard copy (-c) to browse command
The -c parameter will put the url into the clipboard instead of
opening in the browser.
2017-01-06 13:34:16 +00:00
Mislav Marohnić 1b0631c009 Cleanup in git branch & upstream handling in cukes 2016-09-12 10:00:14 +02:00
Mislav Marohnić c25e33e2db Fix case when multiple Enterprise hosts are configured
We only ever read the first hostname from the list because we didn't use
`git config --get-all`.

Fixes #1188
2016-07-12 16:32:25 +02:00
Mislav Marohnić 0a45aa8ddc Reformat inline command help and expand usage options 2016-01-25 02:30:46 +11:00
Mislav Marohnić a77104fc39 Fix `browse` opening current branch pushed to fork
Fixes #896
2016-01-20 14:01:19 +11:00
Mislav Marohnić 9dfc626a20 Fix expectation about `hub browse` usage help 2014-07-27 18:28:20 -07:00
Mislav Marohnić 5539949491 Merge remote-tracking branch 'origin/master' into cukes-master 2014-07-27 14:18:13 -07:00
Mislav Marohnić 1a0c52bb46 Port `hub browse` SSH-related scenarios to cukes 2014-07-25 21:09:47 -07:00
Mislav Marohnić fefefa204d Fix `hub browse` help output when not in any repo 2014-07-25 21:08:31 -07:00
Mislav Marohnić a81e271d07 Uncomment accidentally disabled step in `browse` cukes 2014-07-25 20:37:35 -07:00
Jingwen Owen Ou 69a181bb87 Merge remote-tracking branch 'origin/master' into merge_master
Conflicts:
	Gemfile.lock
	features/browse.feature
2014-07-15 10:48:26 -07:00
Mislav Marohnić 62c4d8358e Fix `hub browse` on detached HEAD
Fixes #588
2014-07-05 10:05:13 +08:00
Wil Moore III 10268ed865 removes the replacement of . => / as that replacement breaks browse for branches like fix-glob-for.js
Conflicts:
	features/browse.feature
2014-04-19 18:19:42 -07:00
Mislav Marohnić 24add1e38a Merge remote-tracking branch 'origin/master' into master-to-gh 2014-04-11 18:05:59 +02:00
Jingwen Owen Ou d16745434d Remove deprecated flag 2014-03-05 08:08:20 -08:00
Mislav Marohnić 641ea1d1db Make `browse` and `compare` respect `protocol` config option
Allows using these commands for Enterprise configurations over regular HTTP.
2014-02-16 03:57:21 +01:00
Mislav Marohnić 47143022b0 Go canonical when browsing to subpage other than commits/tree/blob/settings
If the user is currently on the "feature" branch that is pushed to their
fork, when they do `hub browse -- issues` it should open issues of the
main (canonical) repository, not that of the fork.
2014-02-02 17:55:12 +01:00
Mislav Marohnić cbd4decd8d Prefer browsing upstream when on the master branch
When a user would do `hub browse` on the master branch and they had a
fork, the hub would open the browser with their fork instead of the
upstream project. This is surprising and unwanted, so I've added an
exception for this case.

Fixes #474
2014-02-02 17:55:12 +01:00
Mislav Marohnić a59316ea94 Fix hub when a remote has local path instead of URL
Fixes #470
2014-01-25 15:08:33 +01:00
Mislav Marohnić 06999d907e Improve detecting of origin remote and remote branch
In hub lingo, "origin remote" is the remote pointing to the canonical
GitHub project, i.e. where pull requests should be sent. "Remote branch"
is where hub guesses the user has pushed their changes from the current
local branch.

The origin remote can now be called "upstream", "github", or "origin",
in that order of precedence.

The `browse`, `compare`, and especially `pull-request` commands need to
know the remote branch. Previously we relied on git upstream
configuration, but that wasn't enough. This behavior is now only kept if
git "push.default" is set to "upstream" or "tracking".

For "push.default" values "current", "simple" (git 2.0 default), or
"matching" (git 1.x default), we can safely assume that the user
probably pushes to the same-named branches on some remote, and we ignore
upstream configuration.

To find the remote where the user pushed their changes, we search for
the same-named branch on:

1. the remote which points to a GitHub project owned by the current user;
2. "origin", "github", and "upstream" remotes.

When a match is found, it is assumed that the user pushed there and it
is taken as the implicit pull-request head.

Fixes #158, fixes #360, fixes #381
2013-12-22 00:25:28 +01:00
Mislav Marohnić 0aed04f758 make `compare` and `browse` default branch-aware 2013-07-18 00:08:14 +02:00
Mislav Marohnić dd5f715385 fix unescaping multiple slashes in branch name in URLs 2013-05-25 21:27:25 +02:00
Aaron Stacy b00aa0376e escape branch name as uri component in hub browse
if your branch name contains some characters that are significant to
uri's, then `hub browse` sends you to a 404 page. this change uses
`CGI.escape` to properly encode that when constructing the URL.

an example of where this is a problem is if you use topic branches named
by issues stored in an issue tracker, i.e. `fix-something-#123`
indicating what you're working on and the corresponding issue number.
2013-05-25 19:48:30 +02:00
Mislav Marohnić 18628f8f2f fix hub browse, rewrite its tests as cukes
Fixes #187
2012-05-28 19:14:10 +02:00