Skip to content

Commit

Permalink
workspace: take over creation of .jj/working_copy/ from repo.rs (#13
Browse files Browse the repository at this point in the history
)

It's clearly `Workspace`'s job to create `.jj/working_copy/`, I must
have just forgotten to move it there.
  • Loading branch information
martinvonz committed Jan 29, 2022
1 parent c74882b commit 81edd92
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion lib/src/repo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ impl ReadonlyRepo {

fn init_repo_dir(repo_path: &Path) {
fs::create_dir(repo_path.join("store")).unwrap();
fs::create_dir(repo_path.join("working_copy")).unwrap();
fs::create_dir(repo_path.join("view")).unwrap();
fs::create_dir(repo_path.join("op_store")).unwrap();
fs::create_dir(repo_path.join("op_heads")).unwrap();
Expand Down
4 changes: 3 additions & 1 deletion lib/src/workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ fn init_working_copy(
workspace_root: &Path,
jj_dir: &Path,
) -> WorkingCopy {
let working_copy_state_path = jj_dir.join("working_copy");
std::fs::create_dir(&working_copy_state_path).unwrap();
WorkingCopy::init(
repo.store().clone(),
workspace_root.to_path_buf(),
jj_dir.join("working_copy"),
working_copy_state_path,
repo.op_id().clone(),
repo.view().checkout().clone(),
)
Expand Down

0 comments on commit 81edd92

Please sign in to comment.