Bug fix for dolt_diff in detached head state

This commit is contained in:
Zach Musgrave
2023-06-13 15:37:28 -07:00
parent 9a245d5e40
commit ddb1cc2f22
+3 -1
View File
@@ -821,7 +821,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
}