This commit is contained in:
Kiril Videlov 2024-03-31 00:43:26 +01:00
parent 3d831c8527
commit 04e6d2d7d7
No known key found for this signature in database

View File

@ -9,7 +9,7 @@ use gitbutler_app::watcher::handlers::calculate_deltas_handler::Handler;
use gitbutler_core::{
deltas::{self, operations::Operation},
reader, sessions,
virtual_branches::{self, branch},
virtual_branches::{self, branch, VirtualBranchesHandle},
};
use once_cell::sync::Lazy;
@ -637,8 +637,12 @@ fn should_persist_branches_targets_state_between_sessions() -> Result<()> {
} = &suite.new_case_with_files(HashMap::from([(PathBuf::from("test.txt"), "hello world")]));
let listener = Handler::from_path(suite.local_app_data());
let branch_writer = branch::Writer::new(gb_repository, project.gb_dir())?;
let target_writer = virtual_branches::target::Writer::new(gb_repository, project.gb_dir())?;
let branch_writer =
branch::Writer::new(gb_repository, VirtualBranchesHandle::new(&project.gb_dir()))?;
let target_writer = virtual_branches::target::Writer::new(
gb_repository,
VirtualBranchesHandle::new(&project.gb_dir()),
)?;
let default_target = new_test_target();
target_writer.write_default(&default_target)?;
let mut vbranch0 = new_test_branch();
@ -690,8 +694,12 @@ fn should_restore_branches_targets_state_from_head_session() -> Result<()> {
} = &suite.new_case_with_files(HashMap::from([(PathBuf::from("test.txt"), "hello world")]));
let listener = Handler::from_path(suite.local_app_data());
let branch_writer = branch::Writer::new(gb_repository, project.gb_dir())?;
let target_writer = virtual_branches::target::Writer::new(gb_repository, project.gb_dir())?;
let branch_writer =
branch::Writer::new(gb_repository, VirtualBranchesHandle::new(&project.gb_dir()))?;
let target_writer = virtual_branches::target::Writer::new(
gb_repository,
VirtualBranchesHandle::new(&project.gb_dir()),
)?;
let default_target = new_test_target();
target_writer.write_default(&default_target)?;
let mut vbranch0 = new_test_branch();