working_copy: stop taking initial checkout in constructor

We don't use the value anymore.
This commit is contained in:
Martin von Zweigbergk 2022-02-12 17:22:54 -08:00
parent 993de96fc7
commit cde3609163
2 changed files with 1 additions and 3 deletions

View file

@ -732,7 +732,6 @@ impl WorkingCopy {
state_path: PathBuf, state_path: PathBuf,
operation_id: OperationId, operation_id: OperationId,
workspace_id: WorkspaceId, workspace_id: WorkspaceId,
_commit_id: CommitId,
) -> WorkingCopy { ) -> WorkingCopy {
let mut proto = crate::protos::working_copy::Checkout::new(); let mut proto = crate::protos::working_copy::Checkout::new();
proto.operation_id = operation_id.to_bytes(); proto.operation_id = operation_id.to_bytes();

View file

@ -69,7 +69,7 @@ fn init_working_copy(
std::fs::create_dir(&working_copy_state_path).unwrap(); std::fs::create_dir(&working_copy_state_path).unwrap();
let mut tx = repo.start_transaction(&format!("add workspace '{}'", workspace_id.as_str())); let mut tx = repo.start_transaction(&format!("add workspace '{}'", workspace_id.as_str()));
let checkout_commit = tx.mut_repo().check_out( tx.mut_repo().check_out(
workspace_id.clone(), workspace_id.clone(),
user_settings, user_settings,
&repo.store().root_commit(), &repo.store().root_commit(),
@ -82,7 +82,6 @@ fn init_working_copy(
working_copy_state_path, working_copy_state_path,
repo.op_id().clone(), repo.op_id().clone(),
workspace_id, workspace_id,
checkout_commit.id().clone(),
); );
(working_copy, repo) (working_copy, repo)
} }