Skip to content

Commit

Permalink
cli: remove deprecated jj file commands
Browse files Browse the repository at this point in the history
The following deprecated commands have been removed for their `jj files`
alternatives:

- `jj cat` was deprecated for `jj file show` in 47bd6f4 and e6c2108.
- `jj chmod` was deprecated for `jj file chmod` in 47bd6f4.
- `jj files` was deprecated for `jj file list` in 5d307e6.
  • Loading branch information
bnjmnt4n committed Jan 4, 2025
1 parent 1ddfc59 commit 9472816
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 21 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
* `jj init --git` and `jj init --git-repo` have been removed. They were
deprecated in early 2024. Use `jj git init` instead.

* The following deprecated commands have been removed:
- `jj cat` is replaced by `jj file show`.
- `jj chmod` is replaced by `jj file chmod`.
- `jj files` is replaced by `jj file list`.

### Deprecations

### New features
Expand Down
21 changes: 0 additions & 21 deletions cli/src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,6 @@ enum Command {
// TODO: Remove in jj 0.28+
#[command(subcommand, hide = true)]
Branch(bookmark::BookmarkCommand),
#[command(alias = "print", hide = true)]
Cat(file::show::FileShowArgs),
// TODO: Delete `chmod` in jj 0.25+
#[command(hide = true)]
Chmod(file::chmod::FileChmodArgs),
Commit(commit::CommitArgs),
#[command(subcommand)]
Config(config::ConfigCommand),
Expand All @@ -106,10 +101,6 @@ enum Command {
Evolog(evolog::EvologArgs),
#[command(subcommand)]
File(file::FileCommand),
/// List files in a revision (DEPRECATED use `jj file list`)
// TODO: Delete `files` in jj 0.25+
#[command(hide = true)]
Files(file::list::FileListArgs),
Fix(fix::FixArgs),
#[command(subcommand)]
Git(git::GitCommand),
Expand Down Expand Up @@ -185,14 +176,6 @@ pub fn run_command(ui: &mut Ui, command_helper: &CommandHelper) -> Result<(), Co
let cmd = renamed_cmd("branch", "bookmark", bookmark::cmd_bookmark);
cmd(ui, command_helper, args)
}
Command::Cat(args) => {
let cmd = renamed_cmd("cat", "file show", file::show::cmd_file_show);
cmd(ui, command_helper, args)
}
Command::Chmod(args) => {
let cmd = renamed_cmd("chmod", "file chmod", file::chmod::cmd_file_chmod);
cmd(ui, command_helper, args)
}
Command::Commit(args) => commit::cmd_commit(ui, command_helper, args),
Command::Config(args) => config::cmd_config(ui, command_helper, args),
Command::Debug(args) => debug::cmd_debug(ui, command_helper, args),
Expand All @@ -202,10 +185,6 @@ pub fn run_command(ui: &mut Ui, command_helper: &CommandHelper) -> Result<(), Co
Command::Duplicate(args) => duplicate::cmd_duplicate(ui, command_helper, args),
Command::Edit(args) => edit::cmd_edit(ui, command_helper, args),
Command::File(args) => file::cmd_file(ui, command_helper, args),
Command::Files(args) => {
let cmd = renamed_cmd("files", "file list", file::list::cmd_file_list);
cmd(ui, command_helper, args)
}
Command::Fix(args) => fix::cmd_fix(ui, command_helper, args),
Command::Git(args) => git::cmd_git(ui, command_helper, args),
Command::Help(args) => help::cmd_help(ui, command_helper, args),
Expand Down

0 comments on commit 9472816

Please sign in to comment.