fix status command after removing origin from remote

This commit is contained in:
Meir
2025-04-27 06:25:42 +03:00
parent aecd7c4e77
commit 0f19de102e
+2 -2
View File
@@ -335,8 +335,8 @@ func getRemoteInfo(queryist cli.Queryist, sqlCtx *sql.Context, branchName string
if err != nil {
return ahead, behind, err
}
if len(remoteBranches) != 1 {
return ahead, behind, fmt.Errorf("could not find remote branch %s", remoteBranchRef)
if len(remoteBranches) == 0 {
return ahead, behind, nil
}
remoteBranchCommit := remoteBranches[0][1].(string)