Skip to content

Commit

Permalink
Don't error out when no workingset is found
Browse files Browse the repository at this point in the history
  • Loading branch information
macneale4 committed Jan 27, 2025
1 parent 5bf5642 commit 5599c8d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions go/libraries/doltcore/sqle/dtables/branches_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package dtables

import (
"errors"
"fmt"
"io"

Expand Down Expand Up @@ -237,6 +238,10 @@ func isDirty(ctx *sql.Context, ddb *doltdb.DoltDB, commit *doltdb.Commit, branch
}
ws, err := ddb.ResolveWorkingSetAtRoot(ctx, wsRef, txRoot)
if err != nil {
if errors.Is(err, doltdb.ErrWorkingSetNotFound) {
// If there is not working set for this branch, then it is never dirty. This happens on servers commonly.
return false, nil
}
return false, err
}

Expand Down

0 comments on commit 5599c8d

Please sign in to comment.