fix: preserve evidence revision staleness semantics
This commit is contained in:
@@ -383,6 +383,12 @@ export class WorkspaceRegistry {
|
||||
if (request.baseCommit !== status.head || (
|
||||
request.action !== "create" && existing?.blob !== request.baseBlob
|
||||
)) {
|
||||
const contentOnlyStale = request.action !== "create"
|
||||
&& request.baseCommit !== status.head
|
||||
&& existing?.blob === request.baseBlob;
|
||||
if (contentOnlyStale) {
|
||||
throw new WorkspaceRegistryError("workspace_stale", "Workspace revision is stale");
|
||||
}
|
||||
throw await this.conflictFor(request, status.head!, existing, local);
|
||||
}
|
||||
if (request.action === "create" && existing) throw await this.conflictFor(request, status.head!, existing, local);
|
||||
|
||||
Reference in New Issue
Block a user