From a7219d38f2d24af724273addd6e75358c73aa50d Mon Sep 17 00:00:00 2001 From: Kiril Videlov Date: Fri, 19 Apr 2024 22:51:07 +0200 Subject: [PATCH] rm gb_repository from reset_branch --- .../gitbutler-core/src/virtual_branches/controller.rs | 11 +++-------- crates/gitbutler-core/src/virtual_branches/virtual.rs | 1 - 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/crates/gitbutler-core/src/virtual_branches/controller.rs b/crates/gitbutler-core/src/virtual_branches/controller.rs index 5baa133a3..d899199c3 100644 --- a/crates/gitbutler-core/src/virtual_branches/controller.rs +++ b/crates/gitbutler-core/src/virtual_branches/controller.rs @@ -761,14 +761,9 @@ impl ControllerInner { ) -> Result<(), Error> { let _permit = self.semaphore.acquire().await; - self.with_verify_branch(project_id, |gb_repository, project_repository, _| { - super::reset_branch( - gb_repository, - project_repository, - branch_id, - target_commit_oid, - ) - .map_err(Into::into) + self.with_verify_branch(project_id, |_, project_repository, _| { + super::reset_branch(project_repository, branch_id, target_commit_oid) + .map_err(Into::into) }) } diff --git a/crates/gitbutler-core/src/virtual_branches/virtual.rs b/crates/gitbutler-core/src/virtual_branches/virtual.rs index 7775b4a02..17a2e67ad 100644 --- a/crates/gitbutler-core/src/virtual_branches/virtual.rs +++ b/crates/gitbutler-core/src/virtual_branches/virtual.rs @@ -1976,7 +1976,6 @@ fn virtual_hunks_to_virtual_files( // reset virtual branch to a specific commit pub fn reset_branch( - gb_repository: &gb_repository::Repository, project_repository: &project_repository::Repository, branch_id: &BranchId, target_commit_oid: git::Oid,