Client cannot connect to database in fringe scenario where default branch does not exist.
- Dominant language
- Go
- Stars
- 24.4k
- Forks
- 873
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 120
Description
To repro:
```
dolt branch -c main to_keep
dolt sql -q 'call dolt_checkout("to_keep"); call dolt_branch("-D", "main");'
dolt sql -q "select * from dolt_branches;"
```
Expected output:
```
to_keep
```
Actual output:
```
error on line 1 for query select * from dolt_branches: cannot resolve default branch head for database 'dolt_repo_33790': 'main'
```
According to @zachmu, it's important that the server is always able to start and the client is always able to connect to *something*. This is especially important as we migrate the CLI commands to be implemented in terms of SQL queries, since we should always be able to run CLI commands to fix a weird state we get into.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.