From 3e72c439704df7698bd039159962949f1a065eab Mon Sep 17 00:00:00 2001 From: Yuya Nishihara Date: Wed, 7 Feb 2024 23:54:38 +0900 Subject: [PATCH] cli: suggest "jj git init" if workspace looks like a plain git repo --- cli/src/cli_util.rs | 2 +- cli/tests/test_global_opts.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/src/cli_util.rs b/cli/src/cli_util.rs index 9ebbd614b0..a2a6d646d6 100644 --- a/cli/src/cli_util.rs +++ b/cli/src/cli_util.rs @@ -1882,7 +1882,7 @@ fn map_workspace_load_error(err: WorkspaceLoadError, workspace_path: Option<&str message, "It looks like this is a git repo. You can create a jj repo backed by it by \ running this: -jj init --git-repo=.", +jj git init --git-repo=.", ) } else { user_error(message) diff --git a/cli/tests/test_global_opts.rs b/cli/tests/test_global_opts.rs index 4fde6eef16..4d7e10fac8 100644 --- a/cli/tests/test_global_opts.rs +++ b/cli/tests/test_global_opts.rs @@ -210,7 +210,7 @@ fn test_no_workspace_directory() { insta::assert_snapshot!(stderr, @r###" Error: There is no jj repo in "." Hint: It looks like this is a git repo. You can create a jj repo backed by it by running this: - jj init --git-repo=. + jj git init --git-repo=. "###); }