diff --git a/cli/examples/custom-backend/main.rs b/cli/examples/custom-backend/main.rs index 4ad6a6def3..3f3cc040c8 100644 --- a/cli/examples/custom-backend/main.rs +++ b/cli/examples/custom-backend/main.rs @@ -73,13 +73,13 @@ fn run_custom_command( match command { CustomCommand::InitJit => { let wc_path = command_helper.cwd(); + let settings = command_helper.settings_for_new_workspace(wc_path)?; // Initialize a workspace with the custom backend Workspace::init_with_backend( - command_helper.settings(), + &settings, wc_path, &|settings, store_path| Ok(Box::new(JitBackend::init(settings, store_path)?)), - Signer::from_settings(command_helper.settings()) - .map_err(WorkspaceInitError::SignInit)?, + Signer::from_settings(&settings).map_err(WorkspaceInitError::SignInit)?, )?; Ok(()) } diff --git a/cli/examples/custom-working-copy/main.rs b/cli/examples/custom-working-copy/main.rs index 979820df27..706c1e9754 100644 --- a/cli/examples/custom-working-copy/main.rs +++ b/cli/examples/custom-working-copy/main.rs @@ -63,17 +63,17 @@ fn run_custom_command( match command { CustomCommand::InitConflicts => { let wc_path = command_helper.cwd(); + let settings = command_helper.settings_for_new_workspace(wc_path)?; let backend_initializer = |settings: &UserSettings, store_path: &Path| { let backend: Box = Box::new(GitBackend::init_internal(settings, store_path)?); Ok(backend) }; Workspace::init_with_factories( - command_helper.settings(), + &settings, wc_path, &backend_initializer, - Signer::from_settings(command_helper.settings()) - .map_err(WorkspaceInitError::SignInit)?, + Signer::from_settings(&settings).map_err(WorkspaceInitError::SignInit)?, &ReadonlyRepo::default_op_store_initializer(), &ReadonlyRepo::default_op_heads_store_initializer(), &ReadonlyRepo::default_index_store_initializer(),