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

13 Коммитов

Автор SHA1 Сообщение Дата
Florian Thomas ab4203ec05 fix `compare` command if not on any branch
There is no need to detect the current branch if a range is provided
as an argument.

Fixes #1584.
2018-10-14 18:24:53 +01:00
Mislav Marohnić a9a497c53c Fix `hub compare` for Enterprise when `<USER>` is specified
Fixes #1758
2018-06-14 15:06:08 +02:00
Mislav Marohnić 5d3a687bff Fix `compare` crash when used on a non-GitHub repo 2015-09-28 16:22:34 +02:00
Mislav Marohnić 654ea9ac10 Update `hub compare` usage documentation 2015-09-26 19:39:32 +02:00
Darin Minamoto ca2ebbc4e1 Add base option to compare 2015-06-28 16:04:02 -07:00
Mislav Marohnić 00b846af46 Backport cukes from 1.12-stable branch 2014-12-24 20:20:28 -08:00
Mislav Marohnić 27ebedd801 GitHub stopped supporting escaping slashes in compare URLs
When a fix for #466 landed, it was necessary to escape slashes in branch
names with `;` because they weren't supported as a path component in
compare URLs. Now slashes are supported, but GitHub stopped supporting
semicolons as means of escaping.
2014-07-11 08:17:35 -07: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ć f60fb89274 Escape slashes in compare URLs with semicolon
Fixes #466
2014-01-19 03:58:29 +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ć 26a1e76da6 fix `compare` for ranges containing "owner:branch" notation
Fixes #280
2013-01-21 13:54:20 +01:00
Mislav Marohnić 4877ba957f ported `compare` tests to cukes 2013-01-21 13:45:10 +01:00