Yukai Chou
07a87ca8a4
Wrap special values and placeholders like - and $1
2023-11-23 07:09:29 +08:00
Sam Coe
7924878315
Fix git protocol and refactor Config interface ( #8246 )
2023-10-27 15:42:05 +02:00
William Martin
6dc04bb1e2
Remove GetOrDefault uses in favour of GitProtocol
2023-10-19 12:57:19 +02:00
Keith Bailey
363dacbbed
Set default repository for repo clone and repo fork ( #7768 )
2023-10-11 13:41:00 +00:00
Sam Coe
fac497108b
Set upstream remote to track all branches after initial fetch ( #7542 )
2023-06-12 09:23:56 +09:00
Sam Coe
c9a2d85793
Cleanup config.AuthToken and config.DefaultHost methods ( #7049 )
2023-02-28 00:24:45 +00:00
Mislav Marohnić
14eb873b9e
Avoid implicitly fetching when adding a new git remote ( #6990 )
2023-02-07 21:22:02 +00:00
Sam Coe
4294ee14a1
revert revert 57fbe4f317 ( #6474 )
2022-10-20 12:17:20 +00:00
Sam Coe
2cefb9fa59
Fix pr create regression ( #6472 )
...
* Revert "Refactor to use new git client (#6447 )"
This reverts commit 57fbe4f317 .
* Fix pr create regression
2022-10-20 12:46:23 +03:00
Sam Coe
57fbe4f317
Refactor to use new git client ( #6447 )
2022-10-19 21:11:36 +03:00
Sam Coe
cacff4ad6d
Use go-gh config package ( #5771 )
2022-06-23 11:50:04 +00:00
Ahmed Adan
31bee2e639
Add --upstream-remote-name flag to gh replo clone ( #5619 )
2022-05-24 13:12:01 +02:00
Dan Halbert
51d18d95f1
repo clone: document the upstream remote ( #5466 )
...
Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-05-10 18:12:59 +02:00
nate smith
562f1b3d0d
add GetOrDefault functionality to config
2022-01-11 14:56:58 -06:00
Alan Donovan
f4491c7a80
Add FlagErrorf; encapsulate FlagError.error
2021-10-21 11:40:20 -04:00
Mislav Marohnić
11fbb60ae7
Rename the module to "github.com/cli/cli/v2"
2021-08-25 12:41:30 +02:00
Sam
9ec1e21d4c
Default to GHES host if only GHES is authenticated ( #3286 )
2021-03-30 16:51:00 +02:00
Nate Smith
29805a4003
Merge pull request #2588 from cdce8p/gh-clone-fetch
...
Only fetch default branch when adding upstream remote
2021-01-21 12:57:10 -08:00
Mislav Marohnić
39a0a8c57c
Improve clone wiki test
2020-12-15 17:45:13 +01:00
gunadhya
fd57835bb9
Fix repo clone wiki
2020-12-15 17:45:03 +01:00
cdce8p
f536901bc1
Only fetch DefaultBranchRef when adding upstream remote during gh repo clone
2020-12-09 20:15:21 +01:00
boonhong
57ec879aea
Fix typos
2020-11-12 22:32:36 +08:00
Alisson Santos
cf617e88f4
Extract repeated code to util function
2020-11-03 22:05:04 +01:00
Mislav Marohnić
fc969281cf
Better tests for clone argument parsing
2020-10-29 16:52:50 +01:00
Eric Hagman
af1d8a60e0
Print friendly error when "gh repo clone" is missing required argument
2020-10-21 23:23:39 -04:00
Jonathan Lloyd
8f44aee76a
Load repo and parent in single query
2020-10-13 20:41:16 +01:00
Jonathan Lloyd
487b62d3b9
Clone repos using canonical username/repo name capitalization
...
GitHub user/repo names are case insentitive. This can cause issues when dealing with
repos programmatically using systems that aren't aware of this (e.g. go packages).
This commit updates the cloning logic of the CLI to query the API for the canonical
capitalization and uses that for the clone operation.
Fixes : #1845
2020-10-12 23:39:18 +01:00
Mislav Marohnić
c095a4bead
Allow explicitly specifying the hostname for gh operations
...
Accept the "HOST/OWNER/REPO" syntax or passing a full URL for both the
`--repo` flag and the GH_REPO environment variable and allow setting
GH_HOST environment variable to override just the hostname for
operations that assume "github.com" by default.
Examples:
$ gh repo clone example.org/owner/repo
$ GH_HOST=example.org gh repo clone repo
$ GH_HOST=example.org gh api user
$ GH_HOST=example.org gh gist create myfile.txt
$ gh issue list -R example.org/owner/repo
$ gh issue list -R https://example.org/owner/repo.git
$ GH_REPO=example.org/owner/repo gh issue list
2020-08-12 16:16:34 +02:00
Mislav Marohnić
00bdedb418
💅 Tweak wording
2020-08-11 17:06:36 +02:00
Mislav Marohnić
d876cf15b0
Merge remote-tracking branch 'origin' into issue-1456__clone-flag-help
2020-08-11 16:57:24 +02:00
Mislav Marohnić
a73584db72
Merge remote-tracking branch 'origin' into pr-commands-isolate
2020-08-04 15:01:30 +02:00
Shi Han NG
6e844fef87
Mention git clone flags in gh repo clone usage
2020-08-01 19:09:29 +09:00
Shi Han NG
ca8d032824
Add custom error for gh repo clone
2020-08-01 19:07:51 +09:00
Mislav Marohnić
ffe08995bb
Add notes about GHE support for git_protocol
2020-07-29 22:50:53 +02:00
Mislav Marohnić
0cbcf8a7fa
Merge remote-tracking branch 'origin' into ghe-api
2020-07-27 16:30:20 +02:00
vilmibm
1831d95433
isolated clone command
...
This commit hacks the existing repo clone tests into something usable by
the new isolated command. It went ok and was less effort than trying to
introduce the same kind of test format as repo view and gist create.
2020-07-23 16:40:31 -05:00