mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-05 20:55:05 +00:00
workspace: remove redundant cloning from init_external_git()
Apparently, I forgot to update it in 1db033504c
"repo, workspace: remove
'static lifetime bound from initializer functions."
This commit is contained in:
parent
899c6375a0
commit
787fa1340b
1 changed files with 3 additions and 6 deletions
|
@ -197,10 +197,8 @@ impl Workspace {
|
|||
workspace_root: &Path,
|
||||
git_repo_path: &Path,
|
||||
) -> Result<(Self, Arc<ReadonlyRepo>), WorkspaceInitError> {
|
||||
let backend_initializer = {
|
||||
let workspace_root = workspace_root.to_owned();
|
||||
let git_repo_path = git_repo_path.to_owned();
|
||||
move |settings: &UserSettings, store_path: &Path| -> Result<Box<dyn Backend>, _> {
|
||||
let backend_initializer =
|
||||
|settings: &UserSettings, store_path: &Path| -> Result<Box<dyn Backend>, _> {
|
||||
// If the git repo is inside the workspace, use a relative path to it so the
|
||||
// whole workspace can be moved without breaking.
|
||||
// TODO: Clean up path normalization. store_path is canonicalized by
|
||||
|
@ -218,8 +216,7 @@ impl Workspace {
|
|||
let backend =
|
||||
GitBackend::init_external(settings, store_path, &store_relative_git_repo_path)?;
|
||||
Ok(Box::new(backend))
|
||||
}
|
||||
};
|
||||
};
|
||||
let signer = Signer::from_settings(user_settings)?;
|
||||
Self::init_with_backend(user_settings, workspace_root, &backend_initializer, signer)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue