forked from mirrors/jj
cli: sort debug/git subcommands lexicographically
This commit is contained in:
parent
33ab8d4371
commit
e5a3d6a2ba
4 changed files with 118 additions and 118 deletions
|
@ -48,18 +48,18 @@ use crate::ui::Ui;
|
|||
#[command(hide = true)]
|
||||
pub enum DebugCommand {
|
||||
Fileset(FilesetArgs),
|
||||
Revset(RevsetArgs),
|
||||
#[command(name = "workingcopy")]
|
||||
WorkingCopy(WorkingCopyArgs),
|
||||
Template(TemplateArgs),
|
||||
Index(IndexArgs),
|
||||
Reindex(ReindexArgs),
|
||||
#[command(visible_alias = "view")]
|
||||
Operation(OperationArgs),
|
||||
Reindex(ReindexArgs),
|
||||
Revset(RevsetArgs),
|
||||
Snapshot(SnapshotArgs),
|
||||
Template(TemplateArgs),
|
||||
Tree(TreeArgs),
|
||||
#[command(subcommand)]
|
||||
Watchman(WatchmanCommand),
|
||||
Snapshot(SnapshotArgs),
|
||||
#[command(name = "workingcopy")]
|
||||
WorkingCopy(WorkingCopyArgs),
|
||||
}
|
||||
|
||||
pub fn cmd_debug(
|
||||
|
@ -69,15 +69,15 @@ pub fn cmd_debug(
|
|||
) -> Result<(), CommandError> {
|
||||
match subcommand {
|
||||
DebugCommand::Fileset(args) => cmd_debug_fileset(ui, command, args),
|
||||
DebugCommand::Revset(args) => cmd_debug_revset(ui, command, args),
|
||||
DebugCommand::WorkingCopy(args) => cmd_debug_working_copy(ui, command, args),
|
||||
DebugCommand::Template(args) => cmd_debug_template(ui, command, args),
|
||||
DebugCommand::Index(args) => cmd_debug_index(ui, command, args),
|
||||
DebugCommand::Reindex(args) => cmd_debug_reindex(ui, command, args),
|
||||
DebugCommand::Operation(args) => cmd_debug_operation(ui, command, args),
|
||||
DebugCommand::Reindex(args) => cmd_debug_reindex(ui, command, args),
|
||||
DebugCommand::Revset(args) => cmd_debug_revset(ui, command, args),
|
||||
DebugCommand::Snapshot(args) => cmd_debug_snapshot(ui, command, args),
|
||||
DebugCommand::Template(args) => cmd_debug_template(ui, command, args),
|
||||
DebugCommand::Tree(args) => cmd_debug_tree(ui, command, args),
|
||||
DebugCommand::Watchman(args) => cmd_debug_watchman(ui, command, args),
|
||||
DebugCommand::Snapshot(args) => cmd_debug_snapshot(ui, command, args),
|
||||
DebugCommand::WorkingCopy(args) => cmd_debug_working_copy(ui, command, args),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -43,14 +43,14 @@ use crate::ui::Ui;
|
|||
/// https://github.com/martinvonz/jj/blob/main/docs/git-comparison.md.
|
||||
#[derive(Subcommand, Clone, Debug)]
|
||||
pub enum GitCommand {
|
||||
Clone(CloneArgs),
|
||||
Export(ExportArgs),
|
||||
Fetch(FetchArgs),
|
||||
Import(ImportArgs),
|
||||
Init(InitArgs),
|
||||
Push(PushArgs),
|
||||
#[command(subcommand)]
|
||||
Remote(RemoteCommand),
|
||||
Init(InitArgs),
|
||||
Fetch(FetchArgs),
|
||||
Clone(CloneArgs),
|
||||
Push(PushArgs),
|
||||
Import(ImportArgs),
|
||||
Export(ExportArgs),
|
||||
#[command(subcommand, hide = true)]
|
||||
Submodule(SubmoduleCommand),
|
||||
}
|
||||
|
@ -102,13 +102,13 @@ pub fn cmd_git(
|
|||
subcommand: &GitCommand,
|
||||
) -> Result<(), CommandError> {
|
||||
match subcommand {
|
||||
GitCommand::Init(args) => cmd_git_init(ui, command, args),
|
||||
GitCommand::Fetch(args) => cmd_git_fetch(ui, command, args),
|
||||
GitCommand::Clone(args) => cmd_git_clone(ui, command, args),
|
||||
GitCommand::Remote(args) => cmd_git_remote(ui, command, args),
|
||||
GitCommand::Push(args) => cmd_git_push(ui, command, args),
|
||||
GitCommand::Import(args) => cmd_git_import(ui, command, args),
|
||||
GitCommand::Export(args) => cmd_git_export(ui, command, args),
|
||||
GitCommand::Fetch(args) => cmd_git_fetch(ui, command, args),
|
||||
GitCommand::Import(args) => cmd_git_import(ui, command, args),
|
||||
GitCommand::Init(args) => cmd_git_init(ui, command, args),
|
||||
GitCommand::Push(args) => cmd_git_push(ui, command, args),
|
||||
GitCommand::Remote(args) => cmd_git_remote(ui, command, args),
|
||||
GitCommand::Submodule(args) => cmd_git_submodule(ui, command, args),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,9 +33,9 @@ use crate::ui::Ui;
|
|||
#[derive(Subcommand, Clone, Debug)]
|
||||
pub enum RemoteCommand {
|
||||
Add(AddArgs),
|
||||
List(ListArgs),
|
||||
Remove(RemoveArgs),
|
||||
Rename(RenameArgs),
|
||||
List(ListArgs),
|
||||
}
|
||||
|
||||
pub fn cmd_git_remote(
|
||||
|
@ -45,8 +45,8 @@ pub fn cmd_git_remote(
|
|||
) -> Result<(), CommandError> {
|
||||
match subcommand {
|
||||
RemoteCommand::Add(args) => cmd_remote_add(ui, command, args),
|
||||
RemoteCommand::List(args) => cmd_remote_list(ui, command, args),
|
||||
RemoteCommand::Remove(args) => cmd_remote_remove(ui, command, args),
|
||||
RemoteCommand::Rename(args) => cmd_remote_rename(ui, command, args),
|
||||
RemoteCommand::List(args) => cmd_remote_list(ui, command, args),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,17 +41,17 @@ This document contains the help content for the `jj` command-line program.
|
|||
* [`jj file print`↴](#jj-file-print)
|
||||
* [`jj fix`↴](#jj-fix)
|
||||
* [`jj git`↴](#jj-git)
|
||||
* [`jj git clone`↴](#jj-git-clone)
|
||||
* [`jj git export`↴](#jj-git-export)
|
||||
* [`jj git fetch`↴](#jj-git-fetch)
|
||||
* [`jj git import`↴](#jj-git-import)
|
||||
* [`jj git init`↴](#jj-git-init)
|
||||
* [`jj git push`↴](#jj-git-push)
|
||||
* [`jj git remote`↴](#jj-git-remote)
|
||||
* [`jj git remote add`↴](#jj-git-remote-add)
|
||||
* [`jj git remote list`↴](#jj-git-remote-list)
|
||||
* [`jj git remote remove`↴](#jj-git-remote-remove)
|
||||
* [`jj git remote rename`↴](#jj-git-remote-rename)
|
||||
* [`jj git remote list`↴](#jj-git-remote-list)
|
||||
* [`jj git init`↴](#jj-git-init)
|
||||
* [`jj git fetch`↴](#jj-git-fetch)
|
||||
* [`jj git clone`↴](#jj-git-clone)
|
||||
* [`jj git push`↴](#jj-git-push)
|
||||
* [`jj git import`↴](#jj-git-import)
|
||||
* [`jj git export`↴](#jj-git-export)
|
||||
* [`jj init`↴](#jj-init)
|
||||
* [`jj interdiff`↴](#jj-interdiff)
|
||||
* [`jj log`↴](#jj-log)
|
||||
|
@ -811,76 +811,70 @@ For a comparison with Git, including a table of commands, see https://github.com
|
|||
|
||||
###### **Subcommands:**
|
||||
|
||||
* `remote` — Manage Git remotes
|
||||
* `init` — Create a new Git backed repo
|
||||
* `fetch` — Fetch from a Git remote
|
||||
* `clone` — Create a new repo backed by a clone of a Git repo
|
||||
* `push` — Push to a Git remote
|
||||
* `import` — Update repo with changes made in the underlying Git repo
|
||||
* `export` — Update the underlying Git repo with changes made in the repo
|
||||
* `fetch` — Fetch from a Git remote
|
||||
* `import` — Update repo with changes made in the underlying Git repo
|
||||
* `init` — Create a new Git backed repo
|
||||
* `push` — Push to a Git remote
|
||||
* `remote` — Manage Git remotes
|
||||
|
||||
|
||||
|
||||
## `jj git remote`
|
||||
## `jj git clone`
|
||||
|
||||
Manage Git remotes
|
||||
Create a new repo backed by a clone of a Git repo
|
||||
|
||||
The Git repo will be a bare git repo stored inside the `.jj/` directory.
|
||||
|
||||
**Usage:** `jj git remote <COMMAND>`
|
||||
|
||||
###### **Subcommands:**
|
||||
|
||||
* `add` — Add a Git remote
|
||||
* `remove` — Remove a Git remote and forget its branches
|
||||
* `rename` — Rename a Git remote
|
||||
* `list` — List Git remotes
|
||||
|
||||
|
||||
|
||||
## `jj git remote add`
|
||||
|
||||
Add a Git remote
|
||||
|
||||
**Usage:** `jj git remote add <REMOTE> <URL>`
|
||||
**Usage:** `jj git clone [OPTIONS] <SOURCE> [DESTINATION]`
|
||||
|
||||
###### **Arguments:**
|
||||
|
||||
* `<REMOTE>` — The remote's name
|
||||
* `<URL>` — The remote's URL
|
||||
* `<SOURCE>` — URL or path of the Git repo to clone
|
||||
* `<DESTINATION>` — The directory to write the Jujutsu repo to
|
||||
|
||||
###### **Options:**
|
||||
|
||||
* `--colocate` — Whether or not to colocate the Jujutsu repo with the git repo
|
||||
|
||||
|
||||
|
||||
## `jj git remote remove`
|
||||
## `jj git export`
|
||||
|
||||
Remove a Git remote and forget its branches
|
||||
Update the underlying Git repo with changes made in the repo
|
||||
|
||||
**Usage:** `jj git remote remove <REMOTE>`
|
||||
|
||||
###### **Arguments:**
|
||||
|
||||
* `<REMOTE>` — The remote's name
|
||||
**Usage:** `jj git export`
|
||||
|
||||
|
||||
|
||||
## `jj git remote rename`
|
||||
## `jj git fetch`
|
||||
|
||||
Rename a Git remote
|
||||
Fetch from a Git remote
|
||||
|
||||
**Usage:** `jj git remote rename <OLD> <NEW>`
|
||||
If a working-copy commit gets abandoned, it will be given a new, empty commit. This is true in general; it is not specific to this command.
|
||||
|
||||
###### **Arguments:**
|
||||
**Usage:** `jj git fetch [OPTIONS]`
|
||||
|
||||
* `<OLD>` — The name of an existing remote
|
||||
* `<NEW>` — The desired name for `old`
|
||||
###### **Options:**
|
||||
|
||||
* `-b`, `--branch <BRANCH>` — Fetch only some of the branches
|
||||
|
||||
By default, the specified name matches exactly. Use `glob:` prefix to expand `*` as a glob. The other wildcard characters aren't supported.
|
||||
|
||||
Default value: `glob:*`
|
||||
* `--remote <remote>` — The remote to fetch from (only named remotes are supported, can be repeated)
|
||||
* `--all-remotes` — Fetch from all remotes
|
||||
|
||||
|
||||
|
||||
## `jj git remote list`
|
||||
## `jj git import`
|
||||
|
||||
List Git remotes
|
||||
Update repo with changes made in the underlying Git repo
|
||||
|
||||
**Usage:** `jj git remote list`
|
||||
If a working-copy commit gets abandoned, it will be given a new, empty commit. This is true in general; it is not specific to this command.
|
||||
|
||||
**Usage:** `jj git import`
|
||||
|
||||
|
||||
|
||||
|
@ -913,45 +907,6 @@ Create a new Git backed repo
|
|||
|
||||
|
||||
|
||||
## `jj git fetch`
|
||||
|
||||
Fetch from a Git remote
|
||||
|
||||
If a working-copy commit gets abandoned, it will be given a new, empty commit. This is true in general; it is not specific to this command.
|
||||
|
||||
**Usage:** `jj git fetch [OPTIONS]`
|
||||
|
||||
###### **Options:**
|
||||
|
||||
* `-b`, `--branch <BRANCH>` — Fetch only some of the branches
|
||||
|
||||
By default, the specified name matches exactly. Use `glob:` prefix to expand `*` as a glob. The other wildcard characters aren't supported.
|
||||
|
||||
Default value: `glob:*`
|
||||
* `--remote <remote>` — The remote to fetch from (only named remotes are supported, can be repeated)
|
||||
* `--all-remotes` — Fetch from all remotes
|
||||
|
||||
|
||||
|
||||
## `jj git clone`
|
||||
|
||||
Create a new repo backed by a clone of a Git repo
|
||||
|
||||
The Git repo will be a bare git repo stored inside the `.jj/` directory.
|
||||
|
||||
**Usage:** `jj git clone [OPTIONS] <SOURCE> [DESTINATION]`
|
||||
|
||||
###### **Arguments:**
|
||||
|
||||
* `<SOURCE>` — URL or path of the Git repo to clone
|
||||
* `<DESTINATION>` — The directory to write the Jujutsu repo to
|
||||
|
||||
###### **Options:**
|
||||
|
||||
* `--colocate` — Whether or not to colocate the Jujutsu repo with the git repo
|
||||
|
||||
|
||||
|
||||
## `jj git push`
|
||||
|
||||
Push to a Git remote
|
||||
|
@ -986,21 +941,66 @@ Before the command actually moves, creates, or deletes a remote branch, it makes
|
|||
|
||||
|
||||
|
||||
## `jj git import`
|
||||
## `jj git remote`
|
||||
|
||||
Update repo with changes made in the underlying Git repo
|
||||
Manage Git remotes
|
||||
|
||||
If a working-copy commit gets abandoned, it will be given a new, empty commit. This is true in general; it is not specific to this command.
|
||||
The Git repo will be a bare git repo stored inside the `.jj/` directory.
|
||||
|
||||
**Usage:** `jj git import`
|
||||
**Usage:** `jj git remote <COMMAND>`
|
||||
|
||||
###### **Subcommands:**
|
||||
|
||||
* `add` — Add a Git remote
|
||||
* `list` — List Git remotes
|
||||
* `remove` — Remove a Git remote and forget its branches
|
||||
* `rename` — Rename a Git remote
|
||||
|
||||
|
||||
|
||||
## `jj git export`
|
||||
## `jj git remote add`
|
||||
|
||||
Update the underlying Git repo with changes made in the repo
|
||||
Add a Git remote
|
||||
|
||||
**Usage:** `jj git export`
|
||||
**Usage:** `jj git remote add <REMOTE> <URL>`
|
||||
|
||||
###### **Arguments:**
|
||||
|
||||
* `<REMOTE>` — The remote's name
|
||||
* `<URL>` — The remote's URL
|
||||
|
||||
|
||||
|
||||
## `jj git remote list`
|
||||
|
||||
List Git remotes
|
||||
|
||||
**Usage:** `jj git remote list`
|
||||
|
||||
|
||||
|
||||
## `jj git remote remove`
|
||||
|
||||
Remove a Git remote and forget its branches
|
||||
|
||||
**Usage:** `jj git remote remove <REMOTE>`
|
||||
|
||||
###### **Arguments:**
|
||||
|
||||
* `<REMOTE>` — The remote's name
|
||||
|
||||
|
||||
|
||||
## `jj git remote rename`
|
||||
|
||||
Rename a Git remote
|
||||
|
||||
**Usage:** `jj git remote rename <OLD> <NEW>`
|
||||
|
||||
###### **Arguments:**
|
||||
|
||||
* `<OLD>` — The name of an existing remote
|
||||
* `<NEW>` — The desired name for `old`
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue