just playing with tangled
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

cli: add `jj clone` alias that errors with a friendly message but can be overridden

The main goal here is so that a completely new user that types in `jj
clone` gets a pointer to the correct command needed to try out `jj`.

+20 -1
+2 -1
CHANGELOG.md
··· 91 91 * `jj git fetch` now supports [string pattern syntax](docs/revsets.md#string-patterns) 92 92 on `--remote` option and `git.fetch` configuration. 93 93 94 - * The `jj init` stub that prints an error is now an alias that can be overridden. 94 + * The `jj init` stub that prints an error is now an alias that can be 95 + overridden. `jj clone` is now a similar alias that prints an error by default. 95 96 96 97 ### Fixed bugs 97 98
+10
cli/src/config/misc.toml
··· 5 5 b = ["bookmark"] 6 6 ci = ["commit"] 7 7 unamend = ["unsquash"] 8 + 9 + # Disabled but overridable commands 8 10 init = [ 9 11 "util", 10 12 "error", 11 13 "`jj init` is not defined by default. Perhaps you meant `jj git init`?", 12 14 "--hint", 13 15 """You can configure `aliases.init=["git", "init"]` if you always use the Git backend.""", 16 + "--" 17 + ] 18 + clone = [ 19 + "util", 20 + "error", 21 + "`jj clone` is not defined by default. Perhaps you meant `jj git clone`?", 22 + "--hint", 23 + """You can configure `aliases.clone=["git", "clone"]` if you always use the Git backend.""", 14 24 "--" 15 25 ] 16 26
+8
cli/tests/test_util_command.rs
··· 192 192 [EOF] 193 193 [exit status: 1] 194 194 "#); 195 + let output = test_env.run_jj_in(".", ["clone", "https://example.org/repo"]); 196 + insta::assert_snapshot!(output, @r#" 197 + ------- stderr ------- 198 + Error: `jj clone` is not defined by default. Perhaps you meant `jj git clone`? 199 + Hint: You can configure `aliases.clone=["git", "clone"]` if you always use the Git backend. 200 + [EOF] 201 + [exit status: 1] 202 + "#); 195 203 let output = test_env.run_jj_in(".", ["init", "--help"]); 196 204 insta::assert_snapshot!(output, @r#" 197 205 ------- stderr -------