Merge pull request #3845 from gitbutlerapp/update-base-branch-anyhow

feat: Update base branch handling to use anyhow
This commit is contained in:
Kiril Videlov 2024-05-24 10:44:54 +02:00 committed by GitHub
commit 9db262936c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -336,9 +336,9 @@ fn _print_tree(repo: &git2::Repository, tree: &git2::Tree) -> Result<()> {
pub fn update_base_branch(
project_repository: &project_repository::Repository,
user: Option<&users::User>,
) -> Result<(), errors::UpdateBaseBranchError> {
) -> anyhow::Result<()> {
if project_repository.is_resolving() {
return Err(errors::UpdateBaseBranchError::Conflict(
anyhow::bail!(errors::UpdateBaseBranchError::Conflict(
errors::ProjectConflict {
project_id: project_repository.project().id,
},