From 7055bfdc9ee4fd9793aa27df38cb13c141b411ab Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Mon, 4 Mar 2024 21:26:31 -0800 Subject: [PATCH] cli: move `jj co` alias to config file, so it can be overridden This way users can override `jj co` to mean `jj new` if they want to get rid of the warning. --- cli/src/commands/checkout.rs | 1 - cli/src/config/misc.toml | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cli/src/commands/checkout.rs b/cli/src/commands/checkout.rs index e870bdbc56..fe2fa902b0 100644 --- a/cli/src/commands/checkout.rs +++ b/cli/src/commands/checkout.rs @@ -25,7 +25,6 @@ use crate::ui::Ui; /// For more information, see /// https://github.com/martinvonz/jj/blob/main/docs/working-copy.md. #[derive(clap::Args, Clone, Debug)] -#[command(visible_aliases = &["co"])] pub(crate) struct CheckoutArgs { /// The revision to update to revision: RevisionArg, diff --git a/cli/src/config/misc.toml b/cli/src/config/misc.toml index c3daf74b99..6802b92bca 100644 --- a/cli/src/config/misc.toml +++ b/cli/src/config/misc.toml @@ -1,5 +1,7 @@ +# The code assumes that this table exists, so don't delete it even if you remove +# all aliases from here. [aliases] -# Placeholder: added by user +co = ["checkout"] [format] tree-level-conflicts = true