From bf05975cebe53b8984402aa7b3d2929fc99d49cc Mon Sep 17 00:00:00 2001 From: vilmibm Date: Fri, 15 May 2020 16:40:47 -0500 Subject: [PATCH] Revert "small repo fix" This reverts commit 08e9cdaee18d86cb8b9e9dd7bcd3c287107fad55. --- command/root.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/command/root.go b/command/root.go index 59e52bcf4..be8b31c23 100644 --- a/command/root.go +++ b/command/root.go @@ -267,16 +267,17 @@ func determineBaseRepo(apiClient *api.Client, cmd *cobra.Command, ctx context.Co return ghrepo.FromFullName(repo), nil } - // TODO check to see if the git config has a default repo set; if it seems like an interactive - // environment, ask which of the resolved remotes the user wants to use as the base. if none, let - // them type one in. save in git config and then skip git resolution next time. + baseOverride, err := cmd.Flags().GetString("repo") + if err != nil { + return nil, err + } remotes, err := ctx.Remotes() if err != nil { return nil, err } - repoContext, err := context.ResolveRemotesToRepos(remotes, apiClient, "") + repoContext, err := context.ResolveRemotesToRepos(remotes, apiClient, baseOverride) if err != nil { return nil, err }