提交 d1698648 编写于 作者: M Mislav Marohnić 提交者: Jingwen Owen Ou

Fix `browse` command when on detached HEAD

上级 51979bc6
......@@ -77,7 +77,9 @@ func browse(command *Command, args *Args) {
utils.Check(err)
} else {
currentBranch, err := localRepo.CurrentBranch()
utils.Check(err)
if err != nil {
currentBranch = localRepo.MasterBranch()
}
branch, project, _ = localRepo.RemoteBranchAndProject("", currentBranch.IsMaster())
if branch == nil {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册