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

43 Коммитов

Автор SHA1 Сообщение Дата
Mislav Marohnić accfda9aa4 [remote] Avoid crash in argument parsing
Fixes #2102
2019-04-08 12:11:54 +02:00
Mislav Marohnić dadc26d2e4 Allow repository names that start with a dash character
These are allowed on GitHub.
2019-03-18 12:49:42 +01:00
Mislav Marohnić 8f1b5c7f7f Use ArgsParser for `hub remote add` extension 2019-01-17 02:39:08 +01:00
Mislav Marohnić e036a57e80 Fix broken `hub remote add` tests, docs 2018-10-31 02:32:59 +01:00
Mislav Marohnić de380c0e49 Fix tests broken by `hub remote add` changes
`remote add` may now query the GitHub API to determine whether the
remote URL should be generated in writeable mode or not.
2018-10-31 02:21:57 +01:00
Tasya Aditya Rukmana 6c38dffd17 Add repo visibility and permission check for remote add command 2018-10-05 10:21:29 +08:00
Mislav Marohnić 64e5fe6cbf Support `remote add -t BRANCH` argument 2018-06-26 17:24:33 +02:00
Mislav Marohnić 7633e5b182 Fix GHE host prompts for `hub remote` commands
Now `hub remote` will only prompt to select from your configured hosts
if it can't infer the GitHub hostname from existing remotes.

In case you're prompted, and you choose a GHE host, now that choice will
be properly reflected in the generated URL, unlike before when it would
always revert to "github.com" regardless of choice.

Fixes #1141
2016-08-11 23:34:17 +02:00
Mislav Marohnić 0d3617fd25 Infer project name from git workdir root name instead of PWD
The `create` and `remote` commands needs to infer the current project
name from the project's directory. Instead of using the current working
directory, which doesn't necessarily match the project's toplevel
directory, use `git rev-parse --show-toplevel` which also respects the
`-C` global flag setting.

Fixes #1105, closes #1114
2016-02-28 20:51:21 +09:00
Mislav Marohnić fc9fbd4c38 Cross-references galore! 2016-01-25 02:50:01 +11:00
Mislav Marohnić 0a45aa8ddc Reformat inline command help and expand usage options 2016-01-25 02:30:46 +11:00
Keenan Brock 5355655711 rename gh command to hub in docs 2016-01-19 13:31:47 -05:00
Mislav Marohnić f1bc18970c Auto-private URLs in `remote add` when matching your own repos
`hub remote add origin` and `hub remote add MY-USERNAME` will now act as
if `-p` was given and automatically assign private (SSH) URLs instead of
public ones, because the fact that these are your repos means you have
write access.
2014-12-24 21:48:17 -08:00
Lloyd Dewolf 0855c4f2e3 [trivial] typo 'isPriavte' should be 'isPrivate'. 2014-10-24 12:15:50 -07:00
Jingwen Owen Ou b3d5be4d93 Refactor to `configService` to read & write `Config`
`configService` can save and load `Config` using a strategy of `configEncoder` and `configDecoder`. This pave the path for swapping out `tomlConfigEncoder` and `tomlConfigDecoder` with `yamlConfigEncoder` and `yamlConfigDecoder`.

`Configs` also has been renamed to `Config`.
2014-09-14 17:46:13 -07:00
Jingwen Owen Ou 795cb9ab44 Use host from the main project if it's available 2014-04-08 11:39:51 -07:00
Jingwen Owen Ou a7badc8c84 Validate git dir when getting local repo 2014-04-01 13:40:02 -07:00
Jingwen Owen Ou f054bdf54e Return error when prompting for host.
This'll make sure we propagate error to the caller where we can reformat
the error message within the context.

This fixes `features/authentication.feature:85`
2014-03-27 16:42:14 -07:00
Jingwen Owen Ou 4c7a2816bb Rename more credential* to host 2014-03-25 17:18:30 -07:00
Jingwen Owen Ou 070d5e7b86 Rename Config.DefaultCredential() 2014-03-09 14:42:06 -07:00
Jingwen Owen Ou 498789a999 Change namespace to github/hub 2014-02-10 08:29:03 -08:00
David Calavera 371ae8b432 Add global commands to the runner.
- Use a hash to lookup for commands.
- Add more tests for the command and runner execution.
2013-12-29 14:18:14 -08:00
Jingwen Owen Ou 4316c40c3d Remote is compatible with Hub 2013-12-16 07:54:46 -08:00
Jingwen Owen Ou a613e633b0 Create is compatible with Hub 2013-12-10 13:42:54 -08:00
Jingwen Owen Ou 855f9c65ad Fix remote bug 2013-07-18 15:09:14 -07:00
Jingwen Owen Ou cee5a49a3c Fix remote bug 2013-07-18 15:09:14 -07:00
Jingwen Owen Ou f0c3b28ca0 Implement gh fetch 2013-07-10 16:29:26 -07:00
Jingwen Owen Ou 83a4b6f1ac Implement create 2013-07-09 14:36:02 -07:00
Jingwen Owen Ou 87430090a9 Enable noop 2013-07-05 11:10:24 -07:00
Jingwen Owen Ou e3d6319fa5 Rename to Args#Params 2013-07-02 11:56:45 -07:00
Jingwen Owen Ou fea856826e Add long description to checkout and remote 2013-07-01 11:29:08 -07:00
Jingwen Owen Ou f2ee200ba4 Implement clone 2013-07-01 10:11:02 -07:00
Jingwen Owen Ou 3e21478773 Fix remote not accepting normal args 2013-06-30 09:00:21 -07:00
Jingwen Owen Ou ff5b5ce6d7 Fallthrough to git if no commands match 2013-06-28 16:49:49 -07:00
Jingwen Owen Ou 24eec6ccfc Fix bugs in Args#Remove 2013-06-28 16:49:49 -07:00
Jingwen Owen Ou c294d2b615 Use Args for arguments 2013-06-28 16:49:49 -07:00
Jingwen Owen Ou db292bcf5e Clean up git.go 2013-06-24 14:40:05 -07:00
Jingwen Owen Ou 3ee7aeecb5 Add git.Checkout 2013-06-21 13:17:52 -07:00
Jingwen Owen Ou 85446cae20 Only transform args when it's more than two 2013-06-17 13:58:13 -07:00
Jingwen Owen Ou 4c960d3a3f Print git help if it's an extension 2013-06-17 13:56:57 -07:00
Jingwen Owen Ou c3adf47be6 Finish git remote command 2013-06-17 13:35:02 -07:00
Jingwen Owen Ou ea69a8140c Break down commands into categories 2013-06-17 10:19:54 -07:00
Jingwen Owen Ou 4b63fbec86 Rename remoteAdd to remote 2013-06-14 15:48:32 -07:00