forked from mirrors/jj
workspace: take over creation of .jj/working_copy/
from repo.rs
(#13)
It's clearly `Workspace`'s job to create `.jj/working_copy/`, I must have just forgotten to move it there.
This commit is contained in:
parent
c74882b3c0
commit
81edd92523
2 changed files with 3 additions and 2 deletions
|
@ -153,7 +153,6 @@ impl ReadonlyRepo {
|
||||||
|
|
||||||
fn init_repo_dir(repo_path: &Path) {
|
fn init_repo_dir(repo_path: &Path) {
|
||||||
fs::create_dir(repo_path.join("store")).unwrap();
|
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("view")).unwrap();
|
||||||
fs::create_dir(repo_path.join("op_store")).unwrap();
|
fs::create_dir(repo_path.join("op_store")).unwrap();
|
||||||
fs::create_dir(repo_path.join("op_heads")).unwrap();
|
fs::create_dir(repo_path.join("op_heads")).unwrap();
|
||||||
|
|
|
@ -58,10 +58,12 @@ fn init_working_copy(
|
||||||
workspace_root: &Path,
|
workspace_root: &Path,
|
||||||
jj_dir: &Path,
|
jj_dir: &Path,
|
||||||
) -> WorkingCopy {
|
) -> WorkingCopy {
|
||||||
|
let working_copy_state_path = jj_dir.join("working_copy");
|
||||||
|
std::fs::create_dir(&working_copy_state_path).unwrap();
|
||||||
WorkingCopy::init(
|
WorkingCopy::init(
|
||||||
repo.store().clone(),
|
repo.store().clone(),
|
||||||
workspace_root.to_path_buf(),
|
workspace_root.to_path_buf(),
|
||||||
jj_dir.join("working_copy"),
|
working_copy_state_path,
|
||||||
repo.op_id().clone(),
|
repo.op_id().clone(),
|
||||||
repo.view().checkout().clone(),
|
repo.view().checkout().clone(),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue