From d8308b4c15e476a9473d091a9447fb922e620f24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Thu, 14 Nov 2019 20:54:44 +0100 Subject: [PATCH] Allow `pr checkout` while not on any branch --- command/pr.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/command/pr.go b/command/pr.go index 2f59934a7..6ffa56e8e 100644 --- a/command/pr.go +++ b/command/pr.go @@ -263,10 +263,7 @@ func prCheckout(cmd *cobra.Command, args []string) error { } ctx := contextForCommand(cmd) - currentBranch, err := ctx.Branch() - if err != nil { - return err - } + currentBranch, _ := ctx.Branch() remotes, err := ctx.Remotes() if err != nil { return err