diff --git a/Makefile b/Makefile index e1087832..dfcbf632 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,7 @@ bin/hub: $(SOURCES) script/build -o $@ bin/md2roff: $(SOURCES) - go build -o $@ github.com/github/hub/md2roff-bin + go build -o $@ github.com/github/hub/v2/md2roff-bin test: go test ./... diff --git a/cmd/cmd.go b/cmd/cmd.go index 0cd54cdf..86c2c69a 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -8,7 +8,7 @@ import ( "strings" "syscall" - "github.com/github/hub/ui" + "github.com/github/hub/v2/ui" ) // Cmd is a project-wide struct that represents a command to be run in the console. diff --git a/cmd/cmd_test.go b/cmd/cmd_test.go index 0b11dbbd..b9b394fa 100644 --- a/cmd/cmd_test.go +++ b/cmd/cmd_test.go @@ -3,7 +3,7 @@ package cmd import ( "testing" - "github.com/github/hub/internal/assert" + "github.com/github/hub/v2/internal/assert" ) func TestNew(t *testing.T) { diff --git a/commands/alias.go b/commands/alias.go index ef46f592..43d7cc37 100644 --- a/commands/alias.go +++ b/commands/alias.go @@ -7,8 +7,8 @@ import ( "regexp" "strings" - "github.com/github/hub/ui" - "github.com/github/hub/utils" + "github.com/github/hub/v2/ui" + "github.com/github/hub/v2/utils" ) var cmdAlias = &Command{ diff --git a/commands/api.go b/commands/api.go index 90ee34f4..f4dbef4d 100644 --- a/commands/api.go +++ b/commands/api.go @@ -11,9 +11,9 @@ import ( "strings" "time" - "github.com/github/hub/github" - "github.com/github/hub/ui" - "github.com/github/hub/utils" + "github.com/github/hub/v2/github" + "github.com/github/hub/v2/ui" + "github.com/github/hub/v2/utils" ) var cmdAPI = &Command{ diff --git a/commands/apply.go b/commands/apply.go index 7cfc72fc..deb92bea 100644 --- a/commands/apply.go +++ b/commands/apply.go @@ -6,8 +6,8 @@ import ( "os" "regexp" - "github.com/github/hub/github" - "github.com/github/hub/utils" + "github.com/github/hub/v2/github" + "github.com/github/hub/v2/utils" ) var cmdApply = &Command{ diff --git a/commands/args.go b/commands/args.go index 2ee19587..e98bd802 100644 --- a/commands/args.go +++ b/commands/args.go @@ -4,8 +4,8 @@ import ( "fmt" "strings" - "github.com/github/hub/cmd" - "github.com/github/hub/utils" + "github.com/github/hub/v2/cmd" + "github.com/github/hub/v2/utils" ) type Args struct { diff --git a/commands/args_test.go b/commands/args_test.go index c0c6feea..7ec8842c 100644 --- a/commands/args_test.go +++ b/commands/args_test.go @@ -3,7 +3,7 @@ package commands import ( "testing" - "github.com/github/hub/internal/assert" + "github.com/github/hub/v2/internal/assert" ) func TestNewArgs(t *testing.T) { diff --git a/commands/browse.go b/commands/browse.go index f19bd2ef..7f1ce277 100644 --- a/commands/browse.go +++ b/commands/browse.go @@ -5,8 +5,8 @@ import ( "net/url" "strings" - "github.com/github/hub/github" - "github.com/github/hub/utils" + "github.com/github/hub/v2/github" + "github.com/github/hub/v2/utils" ) var cmdBrowse = &Command{ diff --git a/commands/checkout.go b/commands/checkout.go index 6342c591..cecc235a 100644 --- a/commands/checkout.go +++ b/commands/checkout.go @@ -4,9 +4,9 @@ import ( "fmt" "regexp" - "github.com/github/hub/git" - "github.com/github/hub/github" - "github.com/github/hub/utils" + "github.com/github/hub/v2/git" + "github.com/github/hub/v2/github" + "github.com/github/hub/v2/utils" ) var cmdCheckout = &Command{ diff --git a/commands/cherry_pick.go b/commands/cherry_pick.go index a28cd7ab..3f43f3f3 100644 --- a/commands/cherry_pick.go +++ b/commands/cherry_pick.go @@ -4,8 +4,8 @@ import ( "fmt" "regexp" - "github.com/github/hub/github" - "github.com/github/hub/utils" + "github.com/github/hub/v2/github" + "github.com/github/hub/v2/utils" ) var cmdCherryPick = &Command{ diff --git a/commands/ci_status.go b/commands/ci_status.go index 8ad156bf..41a1cad7 100644 --- a/commands/ci_status.go +++ b/commands/ci_status.go @@ -5,10 +5,10 @@ import ( "os" "sort" - "github.com/github/hub/git" - "github.com/github/hub/github" - "github.com/github/hub/ui" - "github.com/github/hub/utils" + "github.com/github/hub/v2/git" + "github.com/github/hub/v2/github" + "github.com/github/hub/v2/ui" + "github.com/github/hub/v2/utils" ) var cmdCiStatus = &Command{ diff --git a/commands/clone.go b/commands/clone.go index 4dcf2ac7..1284bc16 100644 --- a/commands/clone.go +++ b/commands/clone.go @@ -5,8 +5,8 @@ import ( "regexp" "strings" - "github.com/github/hub/github" - "github.com/github/hub/utils" + "github.com/github/hub/v2/github" + "github.com/github/hub/v2/utils" ) var cmdClone = &Command{ diff --git a/commands/commands.go b/commands/commands.go index 276b67cd..540c1d09 100644 --- a/commands/commands.go +++ b/commands/commands.go @@ -5,7 +5,7 @@ import ( "regexp" "strings" - "github.com/github/hub/utils" + "github.com/github/hub/v2/utils" ) var ( diff --git a/commands/commands_test.go b/commands/commands_test.go index e4cfb359..79a83e50 100644 --- a/commands/commands_test.go +++ b/commands/commands_test.go @@ -6,8 +6,8 @@ import ( "regexp" "testing" - "github.com/github/hub/internal/assert" - "github.com/github/hub/ui" + "github.com/github/hub/v2/internal/assert" + "github.com/github/hub/v2/ui" ) func TestMain(m *testing.M) { diff --git a/commands/compare.go b/commands/compare.go index f7f27eda..6bba2c72 100644 --- a/commands/compare.go +++ b/commands/compare.go @@ -6,8 +6,8 @@ import ( "regexp" "strings" - "github.com/github/hub/github" - "github.com/github/hub/utils" + "github.com/github/hub/v2/github" + "github.com/github/hub/v2/utils" ) var cmdCompare = &Command{ diff --git a/commands/compare_test.go b/commands/compare_test.go index ef7a6a5f..3296e36a 100644 --- a/commands/compare_test.go +++ b/commands/compare_test.go @@ -1,7 +1,7 @@ package commands import ( - "github.com/github/hub/internal/assert" + "github.com/github/hub/v2/internal/assert" "testing" ) diff --git a/commands/create.go b/commands/create.go index 72927d85..d3b07958 100644 --- a/commands/create.go +++ b/commands/create.go @@ -4,10 +4,10 @@ import ( "fmt" "strings" - "github.com/github/hub/git" - "github.com/github/hub/github" - "github.com/github/hub/ui" - "github.com/github/hub/utils" + "github.com/github/hub/v2/git" + "github.com/github/hub/v2/github" + "github.com/github/hub/v2/ui" + "github.com/github/hub/v2/utils" ) var cmdCreate = &Command{ diff --git a/commands/delete.go b/commands/delete.go index 0d622f71..c3b7da8a 100644 --- a/commands/delete.go +++ b/commands/delete.go @@ -7,9 +7,9 @@ import ( "regexp" "strings" - "github.com/github/hub/github" - "github.com/github/hub/ui" - "github.com/github/hub/utils" + "github.com/github/hub/v2/github" + "github.com/github/hub/v2/ui" + "github.com/github/hub/v2/utils" ) var cmdDelete = &Command{ diff --git a/commands/fetch.go b/commands/fetch.go index 3720101f..ebfd771e 100644 --- a/commands/fetch.go +++ b/commands/fetch.go @@ -5,8 +5,8 @@ import ( "regexp" "strings" - "github.com/github/hub/github" - "github.com/github/hub/utils" + "github.com/github/hub/v2/github" + "github.com/github/hub/v2/utils" ) var cmdFetch = &Command{ diff --git a/commands/fetch_test.go b/commands/fetch_test.go index 5b6a26a3..3a0b0a79 100644 --- a/commands/fetch_test.go +++ b/commands/fetch_test.go @@ -1,7 +1,7 @@ package commands import ( - "github.com/github/hub/internal/assert" + "github.com/github/hub/v2/internal/assert" "testing" ) diff --git a/commands/fork.go b/commands/fork.go index a18bca12..ecf168d1 100644 --- a/commands/fork.go +++ b/commands/fork.go @@ -3,9 +3,9 @@ package commands import ( "fmt" - "github.com/github/hub/github" - "github.com/github/hub/ui" - "github.com/github/hub/utils" + "github.com/github/hub/v2/github" + "github.com/github/hub/v2/ui" + "github.com/github/hub/v2/utils" ) var cmdFork = &Command{ diff --git a/commands/gist.go b/commands/gist.go index 4cd3958a..a4479f78 100644 --- a/commands/gist.go +++ b/commands/gist.go @@ -5,9 +5,9 @@ import ( "sort" "strings" - "github.com/github/hub/github" - "github.com/github/hub/ui" - "github.com/github/hub/utils" + "github.com/github/hub/v2/github" + "github.com/github/hub/v2/ui" + "github.com/github/hub/v2/utils" ) var ( diff --git a/commands/help.go b/commands/help.go index 4a9e4c40..b18dbc8d 100644 --- a/commands/help.go +++ b/commands/help.go @@ -8,9 +8,9 @@ import ( "sort" "strings" - "github.com/github/hub/git" - "github.com/github/hub/ui" - "github.com/github/hub/utils" + "github.com/github/hub/v2/git" + "github.com/github/hub/v2/ui" + "github.com/github/hub/v2/utils" "github.com/kballard/go-shellquote" ) diff --git a/commands/init.go b/commands/init.go index f09f0582..18c4bc35 100644 --- a/commands/init.go +++ b/commands/init.go @@ -5,8 +5,8 @@ import ( "regexp" "strings" - "github.com/github/hub/github" - "github.com/github/hub/utils" + "github.com/github/hub/v2/github" + "github.com/github/hub/v2/utils" ) var cmdInit = &Command{ diff --git a/commands/init_test.go b/commands/init_test.go index ecabd566..7d7c112c 100644 --- a/commands/init_test.go +++ b/commands/init_test.go @@ -6,8 +6,8 @@ import ( "path/filepath" "testing" - "github.com/github/hub/github" - "github.com/github/hub/internal/assert" + "github.com/github/hub/v2/github" + "github.com/github/hub/v2/internal/assert" ) func setupInitContext() { diff --git a/commands/issue.go b/commands/issue.go index b9202650..89edd2ea 100644 --- a/commands/issue.go +++ b/commands/issue.go @@ -7,10 +7,10 @@ import ( "strings" "time" - "github.com/github/hub/git" - "github.com/github/hub/github" - "github.com/github/hub/ui" - "github.com/github/hub/utils" + "github.com/github/hub/v2/git" + "github.com/github/hub/v2/github" + "github.com/github/hub/v2/ui" + "github.com/github/hub/v2/utils" ) var ( diff --git a/commands/issue_test.go b/commands/issue_test.go index 824cb4ba..b4630e56 100644 --- a/commands/issue_test.go +++ b/commands/issue_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/github/hub/github" + "github.com/github/hub/v2/github" ) type formatIssueTest struct { diff --git a/commands/merge.go b/commands/merge.go index 3b06fe54..1c4563e9 100644 --- a/commands/merge.go +++ b/commands/merge.go @@ -4,8 +4,8 @@ import ( "fmt" "regexp" - "github.com/github/hub/github" - "github.com/github/hub/utils" + "github.com/github/hub/v2/github" + "github.com/github/hub/v2/utils" ) var cmdMerge = &Command{ diff --git a/commands/pr.go b/commands/pr.go index a9346737..a089ae35 100644 --- a/commands/pr.go +++ b/commands/pr.go @@ -5,10 +5,10 @@ import ( "strconv" "strings" - "github.com/github/hub/git" - "github.com/github/hub/github" - "github.com/github/hub/ui" - "github.com/github/hub/utils" + "github.com/github/hub/v2/git" + "github.com/github/hub/v2/github" + "github.com/github/hub/v2/ui" + "github.com/github/hub/v2/utils" ) var ( diff --git a/commands/pull_request.go b/commands/pull_request.go index 07b7d45b..1472b1d9 100644 --- a/commands/pull_request.go +++ b/commands/pull_request.go @@ -8,9 +8,9 @@ import ( "strings" "time" - "github.com/github/hub/git" - "github.com/github/hub/github" - "github.com/github/hub/utils" + "github.com/github/hub/v2/git" + "github.com/github/hub/v2/github" + "github.com/github/hub/v2/utils" ) var cmdPullRequest = &Command{ diff --git a/commands/pull_request_test.go b/commands/pull_request_test.go index 318e71e7..fbdb0edf 100644 --- a/commands/pull_request_test.go +++ b/commands/pull_request_test.go @@ -3,8 +3,8 @@ package commands import ( "testing" - "github.com/github/hub/github" - "github.com/github/hub/internal/assert" + "github.com/github/hub/v2/github" + "github.com/github/hub/v2/internal/assert" ) func TestPullRequest_ParsePullRequestProject(t *testing.T) { diff --git a/commands/push.go b/commands/push.go index 9998f66d..534004ff 100644 --- a/commands/push.go +++ b/commands/push.go @@ -3,8 +3,8 @@ package commands import ( "strings" - "github.com/github/hub/github" - "github.com/github/hub/utils" + "github.com/github/hub/v2/github" + "github.com/github/hub/v2/utils" ) var cmdPush = &Command{ diff --git a/commands/push_test.go b/commands/push_test.go index 14d46623..de786916 100644 --- a/commands/push_test.go +++ b/commands/push_test.go @@ -1,7 +1,7 @@ package commands import ( - "github.com/github/hub/internal/assert" + "github.com/github/hub/v2/internal/assert" "testing" ) diff --git a/commands/release.go b/commands/release.go index b13a3782..08b5b655 100644 --- a/commands/release.go +++ b/commands/release.go @@ -8,9 +8,9 @@ import ( "strings" "time" - "github.com/github/hub/github" - "github.com/github/hub/ui" - "github.com/github/hub/utils" + "github.com/github/hub/v2/github" + "github.com/github/hub/v2/ui" + "github.com/github/hub/v2/utils" ) var ( diff --git a/commands/remote.go b/commands/remote.go index 5b2068b8..06dec536 100644 --- a/commands/remote.go +++ b/commands/remote.go @@ -5,9 +5,9 @@ import ( "regexp" "strings" - "github.com/github/hub/git" - "github.com/github/hub/github" - "github.com/github/hub/utils" + "github.com/github/hub/v2/git" + "github.com/github/hub/v2/github" + "github.com/github/hub/v2/utils" ) var cmdRemote = &Command{ diff --git a/commands/remote_test.go b/commands/remote_test.go index 534b5332..8f8e49fa 100644 --- a/commands/remote_test.go +++ b/commands/remote_test.go @@ -5,9 +5,9 @@ import ( "regexp" "testing" - "github.com/github/hub/fixtures" - "github.com/github/hub/github" - "github.com/github/hub/internal/assert" + "github.com/github/hub/v2/fixtures" + "github.com/github/hub/v2/github" + "github.com/github/hub/v2/internal/assert" ) func TestTransformRemoteArgs(t *testing.T) { diff --git a/commands/runner.go b/commands/runner.go index becfe30f..089a6122 100644 --- a/commands/runner.go +++ b/commands/runner.go @@ -4,9 +4,9 @@ import ( "fmt" "strings" - "github.com/github/hub/cmd" - "github.com/github/hub/git" - "github.com/github/hub/ui" + "github.com/github/hub/v2/cmd" + "github.com/github/hub/v2/git" + "github.com/github/hub/v2/ui" "github.com/kballard/go-shellquote" ) diff --git a/commands/runner_test.go b/commands/runner_test.go index 83b5c53b..2150cfa3 100644 --- a/commands/runner_test.go +++ b/commands/runner_test.go @@ -3,7 +3,7 @@ package commands import ( "testing" - "github.com/github/hub/internal/assert" + "github.com/github/hub/v2/internal/assert" ) func TestRunner_splitAliasCmd(t *testing.T) { diff --git a/commands/sync.go b/commands/sync.go index 5c85cb8c..ff785c7e 100644 --- a/commands/sync.go +++ b/commands/sync.go @@ -5,10 +5,10 @@ import ( "regexp" "strings" - "github.com/github/hub/git" - "github.com/github/hub/github" - "github.com/github/hub/ui" - "github.com/github/hub/utils" + "github.com/github/hub/v2/git" + "github.com/github/hub/v2/github" + "github.com/github/hub/v2/ui" + "github.com/github/hub/v2/utils" ) var cmdSync = &Command{ diff --git a/commands/utils.go b/commands/utils.go index ca3a1386..422739b4 100644 --- a/commands/utils.go +++ b/commands/utils.go @@ -9,9 +9,9 @@ import ( "strings" "github.com/atotto/clipboard" - "github.com/github/hub/git" - "github.com/github/hub/ui" - "github.com/github/hub/utils" + "github.com/github/hub/v2/git" + "github.com/github/hub/v2/ui" + "github.com/github/hub/v2/utils" ) type stringSliceValue []string diff --git a/commands/utils_test.go b/commands/utils_test.go index 5db84720..cb69c47c 100644 --- a/commands/utils_test.go +++ b/commands/utils_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/github/hub/internal/assert" + "github.com/github/hub/v2/internal/assert" ) func TestDirIsNotEmpty(t *testing.T) { diff --git a/commands/version.go b/commands/version.go index 8ab23a7f..01765530 100644 --- a/commands/version.go +++ b/commands/version.go @@ -1,8 +1,8 @@ package commands import ( - "github.com/github/hub/ui" - "github.com/github/hub/version" + "github.com/github/hub/v2/ui" + "github.com/github/hub/v2/version" ) var cmdVersion = &Command{ diff --git a/fixtures/test_repo.go b/fixtures/test_repo.go index bb76915a..df54323c 100644 --- a/fixtures/test_repo.go +++ b/fixtures/test_repo.go @@ -6,7 +6,7 @@ import ( "os" "path/filepath" - "github.com/github/hub/cmd" + "github.com/github/hub/v2/cmd" ) type TestRepo struct { diff --git a/git/git.go b/git/git.go index b564ea4a..84b8977c 100644 --- a/git/git.go +++ b/git/git.go @@ -6,7 +6,7 @@ import ( "path/filepath" "strings" - "github.com/github/hub/cmd" + "github.com/github/hub/v2/cmd" ) var GlobalFlags []string diff --git a/git/git_test.go b/git/git_test.go index e4c87938..5e20f099 100644 --- a/git/git_test.go +++ b/git/git_test.go @@ -6,8 +6,8 @@ import ( "strings" "testing" - "github.com/github/hub/fixtures" - "github.com/github/hub/internal/assert" + "github.com/github/hub/v2/fixtures" + "github.com/github/hub/v2/internal/assert" ) func TestGitDir(t *testing.T) { diff --git a/git/ssh_config_test.go b/git/ssh_config_test.go index 8b69e2fd..03bdbc3f 100644 --- a/git/ssh_config_test.go +++ b/git/ssh_config_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/github/hub/internal/assert" + "github.com/github/hub/v2/internal/assert" ) func TestSSHConfigReader_Read(t *testing.T) { diff --git a/git/url_test.go b/git/url_test.go index 27b7b0bd..b16a5986 100644 --- a/git/url_test.go +++ b/git/url_test.go @@ -3,7 +3,7 @@ package git import ( "testing" - "github.com/github/hub/internal/assert" + "github.com/github/hub/v2/internal/assert" ) func createURLParser() *URLParser { diff --git a/github/branch.go b/github/branch.go index 7f21b6dc..2466dbea 100644 --- a/github/branch.go +++ b/github/branch.go @@ -5,7 +5,7 @@ import ( "regexp" "strings" - "github.com/github/hub/git" + "github.com/github/hub/v2/git" ) type Branch struct { diff --git a/github/branch_test.go b/github/branch_test.go index b9114e5f..fc304894 100644 --- a/github/branch_test.go +++ b/github/branch_test.go @@ -3,7 +3,7 @@ package github import ( "testing" - "github.com/github/hub/internal/assert" + "github.com/github/hub/v2/internal/assert" ) func TestBranch_ShortName(t *testing.T) { diff --git a/github/client.go b/github/client.go index a1a80615..9b8c868e 100644 --- a/github/client.go +++ b/github/client.go @@ -17,7 +17,7 @@ import ( "strings" "time" - "github.com/github/hub/version" + "github.com/github/hub/v2/version" ) const ( diff --git a/github/client_test.go b/github/client_test.go index 978e3a09..291d4828 100644 --- a/github/client_test.go +++ b/github/client_test.go @@ -6,7 +6,7 @@ import ( "regexp" "testing" - "github.com/github/hub/internal/assert" + "github.com/github/hub/v2/internal/assert" ) func TestClient_FormatError(t *testing.T) { diff --git a/github/config.go b/github/config.go index af5b7afb..320e3b8b 100644 --- a/github/config.go +++ b/github/config.go @@ -12,8 +12,8 @@ import ( "strings" "syscall" - "github.com/github/hub/ui" - "github.com/github/hub/utils" + "github.com/github/hub/v2/ui" + "github.com/github/hub/v2/utils" "github.com/mitchellh/go-homedir" "golang.org/x/crypto/ssh/terminal" ) diff --git a/github/config_service_test.go b/github/config_service_test.go index 69b7b0e4..bc5c7e64 100644 --- a/github/config_service_test.go +++ b/github/config_service_test.go @@ -6,8 +6,8 @@ import ( "strings" "testing" - "github.com/github/hub/fixtures" - "github.com/github/hub/internal/assert" + "github.com/github/hub/v2/fixtures" + "github.com/github/hub/v2/internal/assert" ) func TestConfigService_TomlLoad(t *testing.T) { diff --git a/github/crash_report.go b/github/crash_report.go index 54651d4d..333b3ef0 100644 --- a/github/crash_report.go +++ b/github/crash_report.go @@ -10,10 +10,10 @@ import ( "runtime" "strings" - "github.com/github/hub/git" - "github.com/github/hub/ui" - "github.com/github/hub/utils" - "github.com/github/hub/version" + "github.com/github/hub/v2/git" + "github.com/github/hub/v2/ui" + "github.com/github/hub/v2/utils" + "github.com/github/hub/v2/version" ) const ( diff --git a/github/crash_report_test.go b/github/crash_report_test.go index c24baaf6..2b668204 100644 --- a/github/crash_report_test.go +++ b/github/crash_report_test.go @@ -3,7 +3,7 @@ package github import ( "testing" - "github.com/github/hub/internal/assert" + "github.com/github/hub/v2/internal/assert" ) func TestStackRemoveSelfAndPanic(t *testing.T) { diff --git a/github/editor.go b/github/editor.go index 402d47eb..8cb3d7c0 100644 --- a/github/editor.go +++ b/github/editor.go @@ -10,8 +10,8 @@ import ( "regexp" "strings" - "github.com/github/hub/cmd" - "github.com/github/hub/git" + "github.com/github/hub/v2/cmd" + "github.com/github/hub/v2/git" "github.com/kballard/go-shellquote" ) diff --git a/github/editor_test.go b/github/editor_test.go index b1e11295..ce5f6c22 100644 --- a/github/editor_test.go +++ b/github/editor_test.go @@ -6,7 +6,7 @@ import ( "os" "testing" - "github.com/github/hub/internal/assert" + "github.com/github/hub/v2/internal/assert" ) func TestEditor_openAndEdit_deleteFileWhenOpeningEditorFails(t *testing.T) { diff --git a/github/hosts.go b/github/hosts.go index e95f120b..ed6db201 100644 --- a/github/hosts.go +++ b/github/hosts.go @@ -6,7 +6,7 @@ import ( "os" "strings" - "github.com/github/hub/git" + "github.com/github/hub/v2/git" ) var ( diff --git a/github/http.go b/github/http.go index 12bfa865..aee187b2 100644 --- a/github/http.go +++ b/github/http.go @@ -21,8 +21,8 @@ import ( "strings" "time" - "github.com/github/hub/ui" - "github.com/github/hub/utils" + "github.com/github/hub/v2/ui" + "github.com/github/hub/v2/utils" "golang.org/x/net/http/httpproxy" ) diff --git a/github/http_test.go b/github/http_test.go index 5cdbaeeb..29acaf52 100644 --- a/github/http_test.go +++ b/github/http_test.go @@ -12,7 +12,7 @@ import ( "os" "testing" - "github.com/github/hub/internal/assert" + "github.com/github/hub/v2/internal/assert" ) func setupTestServer(unixSocket string) *testServer { diff --git a/github/localrepo.go b/github/localrepo.go index 9fd58dee..dc04c347 100644 --- a/github/localrepo.go +++ b/github/localrepo.go @@ -5,7 +5,7 @@ import ( "net/url" "strings" - "github.com/github/hub/git" + "github.com/github/hub/v2/git" ) func LocalRepo() (repo *GitHubRepo, err error) { diff --git a/github/localrepo_test.go b/github/localrepo_test.go index 6f99475f..19734ea4 100644 --- a/github/localrepo_test.go +++ b/github/localrepo_test.go @@ -4,7 +4,7 @@ import ( "net/url" "testing" - "github.com/github/hub/internal/assert" + "github.com/github/hub/v2/internal/assert" ) func TestGitHubRepo_remotesForPublish(t *testing.T) { diff --git a/github/message_builder_test.go b/github/message_builder_test.go index bdf521e0..b2d7b9e6 100644 --- a/github/message_builder_test.go +++ b/github/message_builder_test.go @@ -3,7 +3,7 @@ package github import ( "testing" - "github.com/github/hub/internal/assert" + "github.com/github/hub/v2/internal/assert" ) func TestMessageBuilder_multiline_title(t *testing.T) { diff --git a/github/project.go b/github/project.go index b206508b..a0bdb275 100644 --- a/github/project.go +++ b/github/project.go @@ -7,8 +7,8 @@ import ( "path/filepath" "strings" - "github.com/github/hub/git" - "github.com/github/hub/utils" + "github.com/github/hub/v2/git" + "github.com/github/hub/v2/utils" ) type Project struct { diff --git a/github/project_test.go b/github/project_test.go index c81ce440..02afeb3a 100644 --- a/github/project_test.go +++ b/github/project_test.go @@ -5,8 +5,8 @@ import ( "os" "testing" - "github.com/github/hub/fixtures" - "github.com/github/hub/internal/assert" + "github.com/github/hub/v2/fixtures" + "github.com/github/hub/v2/internal/assert" ) func TestSameAs(t *testing.T) { diff --git a/github/remote.go b/github/remote.go index fd0077b2..83bc9d94 100644 --- a/github/remote.go +++ b/github/remote.go @@ -6,7 +6,7 @@ import ( "regexp" "strings" - "github.com/github/hub/git" + "github.com/github/hub/v2/git" ) var ( diff --git a/github/remote_test.go b/github/remote_test.go index 3e5e120e..26c7f89c 100644 --- a/github/remote_test.go +++ b/github/remote_test.go @@ -3,8 +3,8 @@ package github import ( "testing" - "github.com/github/hub/fixtures" - "github.com/github/hub/internal/assert" + "github.com/github/hub/v2/fixtures" + "github.com/github/hub/v2/internal/assert" ) func TestGithubRemote_NoPush(t *testing.T) { diff --git a/github/reset_console.go b/github/reset_console.go index 9a4e199f..054d52a9 100644 --- a/github/reset_console.go +++ b/github/reset_console.go @@ -5,7 +5,7 @@ package github import ( "os" - "github.com/github/hub/cmd" + "github.com/github/hub/v2/cmd" ) func setConsole(cmd *cmd.Cmd) { diff --git a/github/reset_console_windows.go b/github/reset_console_windows.go index 95b7b55b..027bbbd8 100644 --- a/github/reset_console_windows.go +++ b/github/reset_console_windows.go @@ -2,7 +2,7 @@ package github -import "github.com/github/hub/cmd" +import "github.com/github/hub/v2/cmd" // This does nothing on windows func setConsole(cmd *cmd.Cmd) { diff --git a/github/template_test.go b/github/template_test.go index 7a1f670a..5acf01c1 100644 --- a/github/template_test.go +++ b/github/template_test.go @@ -5,8 +5,8 @@ import ( "path/filepath" "testing" - "github.com/github/hub/fixtures" - "github.com/github/hub/internal/assert" + "github.com/github/hub/v2/fixtures" + "github.com/github/hub/v2/internal/assert" ) var prContent = `Description diff --git a/github/url_test.go b/github/url_test.go index 50e3e08d..7bbe0a94 100644 --- a/github/url_test.go +++ b/github/url_test.go @@ -3,8 +3,8 @@ package github import ( "testing" - "github.com/github/hub/fixtures" - "github.com/github/hub/internal/assert" + "github.com/github/hub/v2/fixtures" + "github.com/github/hub/v2/internal/assert" ) func TestParseURL(t *testing.T) { diff --git a/github/util.go b/github/util.go index 4592d163..ef9d0628 100644 --- a/github/util.go +++ b/github/util.go @@ -1,7 +1,7 @@ package github import ( - "github.com/github/hub/git" + "github.com/github/hub/v2/git" ) func IsHTTPSProtocol() bool { diff --git a/go.mod b/go.mod index e2637a96..fa9a48a4 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/github/hub +module github.com/github/hub/v2 go 1.11 diff --git a/main.go b/main.go index 00fdbe5d..928c1493 100644 --- a/main.go +++ b/main.go @@ -7,9 +7,9 @@ import ( "os/exec" "syscall" - "github.com/github/hub/commands" - "github.com/github/hub/github" - "github.com/github/hub/ui" + "github.com/github/hub/v2/commands" + "github.com/github/hub/v2/github" + "github.com/github/hub/v2/ui" ) func main() { diff --git a/md2roff-bin/cmd.go b/md2roff-bin/cmd.go index 6db6b210..77e0d2c7 100644 --- a/md2roff-bin/cmd.go +++ b/md2roff-bin/cmd.go @@ -11,8 +11,8 @@ import ( "strings" "text/template" - "github.com/github/hub/md2roff" - "github.com/github/hub/utils" + "github.com/github/hub/v2/md2roff" + "github.com/github/hub/v2/utils" "github.com/russross/blackfriday" ) diff --git a/script/build b/script/build index 09d1a7cb..058a1874 100755 --- a/script/build +++ b/script/build @@ -14,7 +14,7 @@ find_source_files() { build_hub() { mkdir -p "$(dirname "$1")" go build \ - -ldflags "-X github.com/github/hub/version.Version=`./script/version` $LDFLAGS" \ + -ldflags "-X github.com/github/hub/v2/version.Version=`./script/version` $LDFLAGS" \ -gcflags "$GCFLAGS" \ -asmflags "$ASMFLAGS" \ -o "$1" diff --git a/script/coverage b/script/coverage index 8c061364..91932f09 100755 --- a/script/coverage +++ b/script/coverage @@ -18,7 +18,7 @@ prepare() { go tool cover -mode=set -var="LiveCoverage$((++n))" "$f" > "$f"~ sed -E ' /^package /a\ - import "github.com/github/hub/coverage" + import "github.com/github/hub/v2/coverage" s/(LiveCoverage[0-9]+)\.Count\[([0-9]+)\][^;]+/coverage.Record(\1, \2)/g ' < "$f"~ > "$f" rm "$f"~ @@ -32,7 +32,7 @@ generate() { source_files | xargs git checkout -- echo 'mode: count' > "$HUB_COVERAGE"~ - sed -E 's!^.+/(github.com/github/hub/)!\1!' "$HUB_COVERAGE" | awk ' + sed -E 's!^.+/(github.com/github/hub/v2/)!\1!' "$HUB_COVERAGE" | awk ' { a[substr($0, 0, length()-2)] += $(NF) } END { for (k in a) print k, a[k] } ' >> "$HUB_COVERAGE"~ diff --git a/utils/utils.go b/utils/utils.go index 72834f01..4dd2f7d3 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -10,7 +10,7 @@ import ( "strings" "time" - "github.com/github/hub/ui" + "github.com/github/hub/v2/ui" "github.com/kballard/go-shellquote" ) diff --git a/utils/utils_test.go b/utils/utils_test.go index 3c0a4b1c..629acc0c 100644 --- a/utils/utils_test.go +++ b/utils/utils_test.go @@ -1,7 +1,7 @@ package utils import ( - "github.com/github/hub/internal/assert" + "github.com/github/hub/v2/internal/assert" "testing" "time" )