diff --git a/src/cli_util.rs b/src/cli_util.rs index 96fb05e7f..4611ad513 100644 --- a/src/cli_util.rs +++ b/src/cli_util.rs @@ -275,13 +275,15 @@ jj init --git-repo=."; workspace: Workspace, repo: Arc, ) -> Result { - WorkspaceCommandHelper::for_loaded_repo( + let mut helper = WorkspaceCommandHelper::new( ui, workspace, self.string_args.clone(), &self.global_args, repo, - ) + )?; + helper.snapshot(ui)?; + Ok(helper) } } @@ -329,18 +331,6 @@ impl WorkspaceCommandHelper { }) } - pub fn for_loaded_repo( - ui: &mut Ui, - workspace: Workspace, - string_args: Vec, - global_args: &GlobalArgs, - repo: Arc, - ) -> Result { - let mut helper = Self::new(ui, workspace, string_args, global_args, repo)?; - helper.snapshot(ui)?; - Ok(helper) - } - fn check_working_copy_writable(&self) -> Result<(), CommandError> { if self.may_update_working_copy { Ok(())