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

2224 Коммитов

Автор SHA1 Сообщение Дата
Mislav Marohnić 3e69b8ecff Merge branch 'unknown-shell' 2016-01-21 18:24:07 +11:00
Mislav Marohnić b9077e37e6 Improve "unknown shell" output 2016-01-21 18:23:28 +11:00
Rex Schrader 5c74821593 Clarify "Unknown Shell" Error Message
In instances where the `SHELL` environment variable is not set, nor is the `-s` parameter set it is not clear what action should occur.  Clarify the error message to make it obvious.

Closes #1065

Untested.
2016-01-20 22:56:02 -08:00
James Ko faae9420d0 Add comments 2016-01-20 18:43:44 -05:00
Mislav Marohnić 4a0b0e9cf5 Godeps is no more 2016-01-20 16:14:01 +11:00
Mislav Marohnić d0ee8f64f3 Fix `script/build test` after moving to `vendor/` directory 2016-01-20 16:13:35 +11:00
Mislav Marohnić 753c0c55f0 Avoid `script/format` affecting files under `vendor/` 2016-01-20 15:08:24 +11:00
Mislav Marohnić 1b862e3388 Switch from godep & rewriting import paths to GO15VENDOREXPERIMENT 2016-01-20 14:46:44 +11:00
Mislav Marohnić d0ad43d47c Have `script/boostrap` generate binstubs 2016-01-20 14:03:07 +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ć 648f25cf2f Fix assigning user to pull request without labels
Fixes #1057
2016-01-20 13:46:59 +11:00
Mislav Marohnić 21ab7c7899 Merge pull request #1077 from kbrock/rename_gh
rename gh command to hub in docs
2016-01-20 13:21:55 +11:00
Keenan Brock 5355655711 rename gh command to hub in docs 2016-01-19 13:31:47 -05:00
Mislav Marohnić 6946091963 Merge pull request #1073 from kbrock/clone_docs
document that clone directory is optional
2016-01-19 20:57:44 +11:00
Keenan Brock fc197be6c0 document that clone directory is optional 2016-01-10 15:23:49 -05:00
James Ko 0f6a3423e5 Fix 1024 character limit with setx
setx will automatically truncate the PATH to 1024 characters if it is longer than that. It also mixes the local user's path with the machine-wide path, which is no good.

Unfortunately, the only way around this is running PowerShell to set the PATH manually.

Related link: http://superuser.com/questions/387619/overcoming-the-1024-character-limit-with-setx
2015-12-13 15:54:31 -05:00
Mislav Marohnić 35c76bf91d Merge pull request #1044 from parkr/handle-missing-origin-remote
commands/fork: handle missing "origin" remote
2015-12-08 10:26:02 +01:00
Parker Moore b9af721102 features/fork: remove unnecessary API server. 2015-12-08 00:33:12 -08:00
Parker Moore 0b77c06df5 fork: Check for existence of origin remote before forking. 2015-12-05 10:14:59 -08:00
Parker Moore fb27eeb6f6 commands/fork: handle missing "origin" remote
Fixes nil reference crash. Fixes #1042.
2015-12-03 12:08:58 -08:00
Mislav Marohnić 1202fc4d39 Merge pull request #1024 from github/cache-git-dir
Cache result of `git rev-parse --git-dir`
2015-11-04 11:19:04 +01:00
Mislav Marohnić 2617a13092 Merge pull request #1025 from madhusudancs/parse-remote-for-pushurl
Another attempt at fixing pull-request command for fetch-only remotes.

References #876
2015-11-04 11:18:25 +01:00
Madhusudan.C.S 209d5b0d4c Parse and store both fetch and push URLs from git remotes.
It is a common practice to set the push URL of the "upstream" repository to an
invalid URL to avoid accidentally pushing to upstream instead of a fork. The
trouble with the current approach of obtaining remote URLs is that, the URL
obtained for a remote might not be the valid one, even though a valid remote
fetch URL exists. For example, git remote -v might return the following output

~$ git remote -v

origin      https://github.com/owner/project.git (fetch)
origin      https://github.com/owner/project.git (push)
upstream    https://github.com/main/project.git (fetch)
upstream    no_push (push)

But github.Remotes() currently parses both these URLs but stores only one of
them, the one that comes the last in git remote -v output, for a given remote.
So in this example, the URL for upstream remote might end up to be "no_push"
instead of https://github.com/main/project.git. This causes problems
downstream. For example, pull-request can't proceed with non github.com URLs
and the command fails even when a valid fetch URL for upstream is defined.

This commit fixes the problem by parsing and storing both fetch and push URLs
for each remote. So later, wherever the URLs are required, we can either
look at fetch URL or push URL or both depending on what is required.

Fixes one part of issue #876. Still doesn't recognize "git+ssh" protocol
scheme.
2015-11-02 15:55:05 -08:00
Madhusudan.C.S 90a4f3d7a9 Add a cucumber test to verify that pull-request works with fetch-only upstream remote. 2015-11-02 15:55:05 -08:00
Madhusudan.C.S 29317d283e Add unit tests for git.Remotes() and github.Remotes().
Also, define AddRemote() method for test Repo fixture.
2015-11-02 15:55:05 -08:00
Mislav Marohnić e6823e8d18 Cache result of `git rev-parse --git-dir`
It's invoked often from different methods, but always has the same
results. Cache it after the 1st run so subsequent runs are no-ops.

Before:

    HUB_VERBOSE=1 git browse
    $ git config alias.browse
    $ git rev-parse -q --git-dir
    $ git rev-parse -q --git-dir
    $ git remote -v
    $ git rev-parse -q --git-dir
    $ git config hub.host
    $ git rev-parse -q --git-dir
    $ git config push.default
    $ git rev-parse -q --git-path refs/remotes/origin/no-angular
    $ git rev-parse -q --git-dir
    $ git rev-parse -q --git-dir
    $ git rev-parse -q --git-dir

After (6 fewer invocations):

    HUB_VERBOSE=1 git browse
    $ git config alias.browse
    $ git rev-parse -q --git-dir
    $ git remote -v
    $ git config hub.host
    $ git config push.default
    $ git rev-parse -q --git-path refs/remotes/origin/no-angular
2015-10-31 18:05:37 +01:00
Mislav Marohnić 923402ad1a Go formatting fixes
[ci skip]
2015-10-31 01:52:17 +01:00
Mislav Marohnić e2c15c9be9 Merge pull request #1023 from github/verbose-git
Have `HUB_VERBOSE` also log externally run commands
2015-10-31 01:51:56 +01:00
Mislav Marohnić d1b2bb3b32 Merge pull request #1022 from github/git-C-path
Properly support `-C` git global flag
2015-10-31 01:50:08 +01:00
Mislav Marohnić dbb5f06911 Have `HUB_VERBOSE` also log externally run commands 2015-10-31 01:45:20 +01:00
Mislav Marohnić 64e83cef20 Move `IsTerminal()` function to "ui" package 2015-10-31 01:45:20 +01:00
Mislav Marohnić b51be1cfba Properly support `-C` git global flag
From git documentation:

    -C <path> : Run as if git was started in <path> instead of the
                current working directory. When multiple -C options are
                given, each subsequent non-absolute -C <path> is
                interpreted relative to the preceding -C <path>.

We correctly forwarded the `-C <path>` values as git global flags to git
invocations such as `git rev-parse --git-dir`, but that command is
designed to return the result as a relative path to the value computed
from `-C`. This adds an extra step to transform this relative path to an
absolute one by applying values of `-C` as the base directory.
2015-10-31 01:43:28 +01:00
Mislav Marohnić c0fc987fc7 Fix `script/version` in non-git repo context
Fixes #1015, broken after #861

[ci skip]
2015-10-22 20:02:44 +02:00
Mislav Marohnić ec733a938b Merge pull request #959 from heitortsergent/zsh_instructions
Add installation instructions for zsh tab-completion
2015-10-19 20:31:11 +02:00
Heitor Tashiro Sergent 296f43a86c Add bash + homebrew section and bash_profile mention
Also removed instructions and references to set up git auto-completion.
2015-10-17 20:59:48 -05:00
Heitor Tashiro Sergent d0df01645e Update zsh instructions and add bash instructions 2015-10-13 15:53:54 -05:00
Heitor Tashiro Sergent bbd2b44e96 Add installation instructions for zsh 2015-10-13 15:53:54 -05:00
Mislav Marohnić aa63aa67f2 Ensure that project comparison is done case-insensitive
Fixes #929
2015-09-30 17:52:33 +02:00
Mislav Marohnić dfafe14295 Merge pull request #1003 from github/compare-crash
Fix `compare` crash when used on a non-GitHub repo
2015-09-28 16:32: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ć 504d468d0f Merge pull request #999 from github/combined-status
Enhance `hub ci-status` to consume and display combined statuses
2015-09-28 15:47:17 +02:00
Mislav Marohnić 98a76eca00 Code 💄 2015-09-28 13:50:47 +02:00
Mislav Marohnić f3d61f61fc Compensate for the fact that "target_url" might be blank
CI statuses from GitHub API might not have "target_url" property.
2015-09-28 13:25:48 +02:00
Mislav Marohnić ac6475cd8e Merge pull request #922 from github/cross-compiling
Automatically publish a GitHub release from Travis CI
2015-09-28 01:04:00 +02:00
Mislav Marohnić 94cb5c9d3f `clone_test.go` are no longer possible in isolation
The `transformCloneArgs` function now performs API requests and is best
testable through cukes rather than these tests.
2015-09-28 00:47:31 +02:00
Mislav Marohnić b64cc38f43 Really reset current localization settings
Fixes #841
2015-09-28 00:00:26 +02:00
Mislav Marohnić 93eccff35d Check if GitHub repo exists before every `hub clone`
If it doesn't exist, print a more helpful error message about it so the
user knows which "owner/repo" pair was tested.
2015-09-27 22:42:49 +02:00
Mislav Marohnić 17a4df595a Add scheme to HUB_TEST_HOST to avoid confusing Go error 2015-09-27 22:42:49 +02:00
Mislav Marohnić 878566269a Fix typo in `clone` example outcome 2015-09-27 21:42:25 +02:00
Mislav Marohnić fc08248073 Merge branch 'master' into cross-compiling 2015-09-27 21:38:34 +02:00