forked from mirrors/jj
cli: move jj amend/unamend
aliases to config
The `amend/unamend` aliases exist for smoothen onboarding for Git/Mercurial users; I don't think we should recommend that users use them, so I think it's fine if users override them as they like. Therefore, I think they belong in the config.
This commit is contained in:
parent
099f06bf71
commit
6d78d92d91
4 changed files with 4 additions and 3 deletions
|
@ -36,7 +36,6 @@ use crate::ui::Ui;
|
||||||
/// If a working-copy commit gets abandoned, it will be given a new, empty
|
/// 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.
|
/// commit. This is true in general; it is not specific to this command.
|
||||||
#[derive(clap::Args, Clone, Debug)]
|
#[derive(clap::Args, Clone, Debug)]
|
||||||
#[command(visible_alias = "amend")]
|
|
||||||
pub(crate) struct SquashArgs {
|
pub(crate) struct SquashArgs {
|
||||||
#[arg(long, short, default_value = "@")]
|
#[arg(long, short, default_value = "@")]
|
||||||
revision: RevisionArg,
|
revision: RevisionArg,
|
||||||
|
|
|
@ -36,7 +36,6 @@ use crate::ui::Ui;
|
||||||
/// If a working-copy commit gets abandoned, it will be given a new, empty
|
/// 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.
|
/// commit. This is true in general; it is not specific to this command.
|
||||||
#[derive(clap::Args, Clone, Debug)]
|
#[derive(clap::Args, Clone, Debug)]
|
||||||
#[command(visible_alias = "unamend")]
|
|
||||||
pub(crate) struct UnsquashArgs {
|
pub(crate) struct UnsquashArgs {
|
||||||
#[arg(long, short, default_value = "@")]
|
#[arg(long, short, default_value = "@")]
|
||||||
revision: RevisionArg,
|
revision: RevisionArg,
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
# The code assumes that this table exists, so don't delete it even if you remove
|
# The code assumes that this table exists, so don't delete it even if you remove
|
||||||
# all aliases from here.
|
# all aliases from here.
|
||||||
[aliases]
|
[aliases]
|
||||||
|
amend = ["squash"]
|
||||||
co = ["checkout"]
|
co = ["checkout"]
|
||||||
|
unamend = ["unsquash"]
|
||||||
|
|
||||||
|
|
||||||
[format]
|
[format]
|
||||||
tree-level-conflicts = true
|
tree-level-conflicts = true
|
||||||
|
|
|
@ -389,7 +389,7 @@ Obviously, you would only set one line, don't copy them all in!
|
||||||
## Editing diffs
|
## Editing diffs
|
||||||
|
|
||||||
The `ui.diff-editor` setting affects the tool used for editing diffs (e.g. `jj
|
The `ui.diff-editor` setting affects the tool used for editing diffs (e.g. `jj
|
||||||
split`, `jj amend -i`). The default is the special value `:builtin`, which
|
split`, `jj squash -i`). The default is the special value `:builtin`, which
|
||||||
launches a built-in TUI tool (known as [scm-diff-editor]) to edit the diff in
|
launches a built-in TUI tool (known as [scm-diff-editor]) to edit the diff in
|
||||||
your terminal.
|
your terminal.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue