From 7f61deeb21a8415f98115c8374ebaf2cc7e655d1 Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Sat, 11 Dec 2021 11:03:40 -0800 Subject: [PATCH] cli: when run in git repo, hint about setting up collocated jj workspace (#44) Now that it's much easier to use a shared working copy between git and jj, let's update the hint about how to set up a jj repo backed by the git repo to use a shared working copy. --- src/commands.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/commands.rs b/src/commands.rs index 52223fd3f..f5993519b 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -185,17 +185,9 @@ impl<'args> CommandHelper<'args> { if git_dir.is_dir() { // TODO: Make this hint separate from the error, so the caller can format // it differently. - let git_dir_str = PathBuf::from(wc_path_str) - .join(".git") - .to_str() - .unwrap() - .to_owned(); - message += &format!( - " + message += " It looks like this is a git repo. You can create a jj repo backed by it by running this: -jj init --git-store={} ", - git_dir_str - ); +jj init --git-store=."; } return Err(CommandError::UserError(message)); }