From 4d98a052c81f8e410946f470e96b6cafc916437c Mon Sep 17 00:00:00 2001 From: Zach Musgrave Date: Sun, 19 May 2024 15:05:38 -0700 Subject: [PATCH 1/3] Attempt to repro bug, nothing yet --- integration-tests/bats/sql-pull.bats | 31 ++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/integration-tests/bats/sql-pull.bats b/integration-tests/bats/sql-pull.bats index 69c6a7370e..d7184b5053 100644 --- a/integration-tests/bats/sql-pull.bats +++ b/integration-tests/bats/sql-pull.bats @@ -406,3 +406,34 @@ SQL [[ "$output" =~ "merge from origin" ]] || false } +@test "sql-pull: pull two different branches same session" { + cd repo2 + dolt pull + + dolt sql < Date: Sun, 19 May 2024 17:13:29 -0700 Subject: [PATCH 2/3] Repro for bad pull behavior when already up to date --- integration-tests/bats/sql-pull.bats | 74 ++++++++++++++++++++++++++-- 1 file changed, 69 insertions(+), 5 deletions(-) diff --git a/integration-tests/bats/sql-pull.bats b/integration-tests/bats/sql-pull.bats index d7184b5053..662ba9b9bd 100644 --- a/integration-tests/bats/sql-pull.bats +++ b/integration-tests/bats/sql-pull.bats @@ -406,15 +406,15 @@ SQL [[ "$output" =~ "merge from origin" ]] || false } -@test "sql-pull: pull two different branches same session" { +@test "sql-pull: pull two different branches in the same session" { cd repo2 dolt pull dolt sql < Date: Mon, 20 May 2024 18:04:20 -0700 Subject: [PATCH 3/3] Bug fix for pull leaving working set dirty when it's already up to date --- go/libraries/doltcore/sqle/dprocedures/dolt_pull.go | 5 ----- 1 file changed, 5 deletions(-) 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())