mirror of
https://github.com/dolthub/dolt.git
synced 2026-02-11 02:59:34 -06:00
fix err check and multi remote branch test
This commit is contained in:
@@ -558,10 +558,13 @@ func checkoutExistingBranchWithWorkingSetFallback(
|
||||
}
|
||||
|
||||
err = checkoutExistingBranch(ctx, dbName, branchName, apr)
|
||||
}
|
||||
if err != nil {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
} else if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -847,7 +847,7 @@ SQL
|
||||
|
||||
dolt checkout main
|
||||
|
||||
# Use explicit branch reference
|
||||
# use explicit branch reference
|
||||
dolt checkout feature --
|
||||
|
||||
# verify we switched to feature branch
|
||||
@@ -1146,9 +1146,15 @@ SQL
|
||||
echo "$output"
|
||||
[[ "$output" =~ "'feature' matched multiple (2) remote tracking branches" ]] || false
|
||||
|
||||
run dolt checkout --track origin/feature
|
||||
[ "$status" -eq 0 ]
|
||||
echo "$output"
|
||||
[[ "$output" =~ "Switched to branch 'feature'" ]] || false
|
||||
[[ "$output" =~ "branch 'feature' set up to track 'origin/feature'" ]] || false
|
||||
|
||||
# verify we're still on main branch
|
||||
run dolt branch
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" =~ "* main" ]] || false
|
||||
[[ "$output" =~ "* feature" ]] || false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user