move snapshot MoveCommit before the operation

This commit is contained in:
Kiril Videlov 2024-05-23 11:59:26 +02:00
parent 55da2e550e
commit 1312813051

View File

@ -939,12 +939,11 @@ impl ControllerInner {
let _permit = self.semaphore.acquire().await;
self.with_verify_branch(project_id, |project_repository, user| {
let result = super::move_commit(project_repository, target_branch_id, commit_oid, user)
.map_err(Into::into);
let _ = project_repository
.project()
.create_snapshot(SnapshotDetails::new(OperationType::MoveCommit));
result
super::move_commit(project_repository, target_branch_id, commit_oid, user)
.map_err(Into::into)
})
}
}