mirror of
https://github.com/dolthub/dolt.git
synced 2026-04-29 03:06:35 -05:00
Avoid changing the default branch when we check out tables, not a branch.
This commit is contained in:
@@ -152,7 +152,7 @@ func (cmd CheckoutCmd) Exec(ctx context.Context, commandStr string, args []strin
|
||||
cli.Println(message)
|
||||
}
|
||||
|
||||
if dEnv != nil {
|
||||
if dEnv != nil && strings.Contains(message, "Switched to branch") {
|
||||
err := saveHeadBranch(dEnv.FS, branchName)
|
||||
if err != nil {
|
||||
cli.PrintErr(err)
|
||||
|
||||
Reference in New Issue
Block a user