diff --git a/go/libraries/doltcore/sqle/dprocedures/dolt_pull.go b/go/libraries/doltcore/sqle/dprocedures/dolt_pull.go index 47dd51ded5..5ef20e7e37 100644 --- a/go/libraries/doltcore/sqle/dprocedures/dolt_pull.go +++ b/go/libraries/doltcore/sqle/dprocedures/dolt_pull.go @@ -204,11 +204,6 @@ func doDoltPull(ctx *sql.Context, args []string) (int, int, string, error) { if err != nil && !errors.Is(doltdb.ErrUpToDate, err) { return conflicts, fastForward, "", err } - - err = sess.SetWorkingSet(ctx, dbName, ws) - if err != nil { - return conflicts, fastForward, "", err - } } if !rsSeen { return noConflictsOrViolations, threeWayMerge, "", fmt.Errorf("%w: '%s'", ref.ErrInvalidRefSpec, refSpec.GetRemRefToLocal()) diff --git a/integration-tests/bats/sql-pull.bats b/integration-tests/bats/sql-pull.bats index 69c6a7370e..662ba9b9bd 100644 --- a/integration-tests/bats/sql-pull.bats +++ b/integration-tests/bats/sql-pull.bats @@ -406,3 +406,98 @@ SQL [[ "$output" =~ "merge from origin" ]] || false } +@test "sql-pull: pull two different branches in the same session" { + cd repo2 + dolt pull + + dolt sql <