Merge pull request #6149 from dolthub/zachmu/ld-fix

[no-release-notes] Bug fix for dolt_diff in detached head state
This commit is contained in:
Zach Musgrave
2023-06-13 16:16:33 -07:00
committed by GitHub

View File

@@ -777,7 +777,9 @@ func (d *DoltSession) ResolveRootForRef(ctx *sql.Context, dbName, refStr string)
}
headRef, err := d.CWBHeadRef(ctx, dbName)
if err != nil {
if err == doltdb.ErrOperationNotSupportedInDetachedHead {
// leave head ref nil, we may not need it (commit hash)
} else if err != nil {
return nil, nil, "", err
}