diff --git a/Cargo.lock b/Cargo.lock
index 043db0ee5..d2b78a8bd 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2270,6 +2270,7 @@ version = "0.0.0"
dependencies = [
"anyhow",
"git2",
+ "gitbutler-branch",
"gitbutler-core",
"keyring",
"once_cell",
diff --git a/crates/gitbutler-branch/src/base.rs b/crates/gitbutler-branch/src/base.rs
index 9e699db69..2ab84c2e3 100644
--- a/crates/gitbutler-branch/src/base.rs
+++ b/crates/gitbutler-branch/src/base.rs
@@ -4,12 +4,12 @@ use anyhow::{anyhow, Context, Result};
use git2::Index;
use serde::Serialize;
-use gitbutler_core::virtual_branches::integration::{
- get_workspace_head, update_gitbutler_integration,
-};
+use super::r#virtual as vb;
+use super::r#virtual::convert_to_real_branch;
+use crate::integration::{get_workspace_head, update_gitbutler_integration};
+use crate::VirtualBranchHunk;
use gitbutler_core::virtual_branches::{
- branch, convert_to_real_branch, target, BranchId, RemoteCommit, VirtualBranchHunk,
- VirtualBranchesHandle, GITBUTLER_INTEGRATION_REFERENCE,
+ branch, target, BranchId, RemoteCommit, VirtualBranchesHandle, GITBUTLER_INTEGRATION_REFERENCE,
};
use gitbutler_core::{error::Marker, git::RepositoryExt, rebase::cherry_rebase};
use gitbutler_core::{
@@ -246,7 +246,7 @@ pub fn set_base_branch(
created_timestamp_ms: now_ms,
updated_timestamp_ms: now_ms,
head: current_head_commit.id(),
- tree: gitbutler_core::virtual_branches::write_tree_onto_commit(
+ tree: vb::write_tree_onto_commit(
project_repository,
current_head_commit.id(),
diff::diff_files_into_hunks(wd_diff),
@@ -363,173 +363,181 @@ pub fn update_base_branch(
let integration_commit = get_workspace_head(&vb_state, project_repository)?;
// try to update every branch
- let updated_vbranches = gitbutler_core::virtual_branches::get_status_by_branch(
- project_repository,
- Some(&integration_commit),
- )?
- .0
- .into_iter()
- .map(|(branch, _)| branch)
- .map(
- |mut branch: branch::Branch| -> Result