diff --git a/cli/src/commands/abandon.rs b/cli/src/commands/abandon.rs index 2b3f8ab51..896e9db49 100644 --- a/cli/src/commands/abandon.rs +++ b/cli/src/commands/abandon.rs @@ -27,6 +27,9 @@ use crate::ui::Ui; /// Abandon a revision, rebasing descendants onto its parent(s). The behavior is /// similar to `jj restore --changes-in`; the difference is that `jj abandon` /// gives you a new change, while `jj restore` updates the existing change. +/// +/// 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. #[derive(clap::Args, Clone, Debug)] pub(crate) struct AbandonArgs { /// The revision(s) to abandon diff --git a/cli/src/commands/git.rs b/cli/src/commands/git.rs index b93d66084..7a3edf23c 100644 --- a/cli/src/commands/git.rs +++ b/cli/src/commands/git.rs @@ -150,6 +150,9 @@ pub struct GitInitArgs { } /// 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. #[derive(clap::Args, Clone, Debug)] pub struct GitFetchArgs { /// Fetch only some of the branches @@ -233,6 +236,9 @@ pub struct GitPushArgs { } /// Update repo with changes made in the underlying Git repo +/// +/// 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. #[derive(clap::Args, Clone, Debug)] pub struct GitImportArgs {} diff --git a/cli/src/commands/move.rs b/cli/src/commands/move.rs index 61f76b03f..2a7ceb1bc 100644 --- a/cli/src/commands/move.rs +++ b/cli/src/commands/move.rs @@ -34,6 +34,9 @@ use crate::ui::Ui; /// If the source became empty and both the source and destination had a /// non-empty description, you will be asked for the combined description. If /// either was empty, then the other one will be used. +/// +/// 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. #[derive(clap::Args, Clone, Debug)] #[command(group(ArgGroup::new("to_move").args(&["from", "to"]).multiple(true).required(true)))] pub(crate) struct MoveArgs { diff --git a/cli/src/commands/rebase.rs b/cli/src/commands/rebase.rs index 8e02bf2dc..abe6c8152 100644 --- a/cli/src/commands/rebase.rs +++ b/cli/src/commands/rebase.rs @@ -116,6 +116,9 @@ use crate::ui::Ui; /// |/ |/ /// J J /// ``` +/// +/// 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. #[derive(clap::Args, Clone, Debug)] #[command(verbatim_doc_comment)] #[command(group(ArgGroup::new("to_rebase").args(&["branch", "source", "revision"])))] diff --git a/cli/src/commands/squash.rs b/cli/src/commands/squash.rs index c91624ed8..d249048a8 100644 --- a/cli/src/commands/squash.rs +++ b/cli/src/commands/squash.rs @@ -31,6 +31,9 @@ use crate::ui::Ui; /// If the source became empty and both the source and destination had a /// non-empty description, you will be asked for the combined description. If /// either was empty, then the other one will be used. +/// +/// 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. #[derive(clap::Args, Clone, Debug)] #[command(visible_alias = "amend")] pub(crate) struct SquashArgs { diff --git a/cli/src/commands/unsquash.rs b/cli/src/commands/unsquash.rs index 113ef3ba8..4ad63261d 100644 --- a/cli/src/commands/unsquash.rs +++ b/cli/src/commands/unsquash.rs @@ -31,6 +31,9 @@ use crate::ui::Ui; /// If the source became empty and both the source and destination had a /// non-empty description, you will be asked for the combined description. If /// either was empty, then the other one will be used. +/// +/// 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. #[derive(clap::Args, Clone, Debug)] #[command(visible_alias = "unamend")] pub(crate) struct UnsquashArgs { diff --git a/cli/tests/cli-reference@.md.snap b/cli/tests/cli-reference@.md.snap index 636055acd..19a23e5be 100644 --- a/cli/tests/cli-reference@.md.snap +++ b/cli/tests/cli-reference@.md.snap @@ -172,6 +172,8 @@ Abandon a revision Abandon a revision, rebasing descendants onto its parent(s). The behavior is similar to `jj restore --changes-in`; the difference is that `jj abandon` gives you a new change, while `jj restore` updates the existing change. +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 abandon [OPTIONS] [REVISIONS]...` ###### **Arguments:** @@ -847,6 +849,8 @@ Create a new Git backed repo 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:** @@ -921,6 +925,8 @@ By default, pushes any branches pointing to `remote_branches(remote=)..@ Update repo with changes made in the underlying Git repo +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` @@ -1056,6 +1062,8 @@ Use `--interactive` to move only part of the source revision into the destinatio If the source became empty and both the source and destination had a non-empty description, you will be asked for the combined description. If either was empty, then the other one will be used. +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 move [OPTIONS] <--from |--to > [PATHS]...` ###### **Arguments:** @@ -1457,6 +1465,9 @@ M L' J J ``` +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 rebase [OPTIONS] --destination ` ###### **Options:** @@ -1668,6 +1679,8 @@ After moving the changes into the parent, the child revision will have the same If the source became empty and both the source and destination had a non-empty description, you will be asked for the combined description. If either was empty, then the other one will be used. +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 squash [OPTIONS] [PATHS]...` ###### **Arguments:** @@ -1858,6 +1871,8 @@ After moving the changes out of the parent, the child revision will have the sam If the source became empty and both the source and destination had a non-empty description, you will be asked for the combined description. If either was empty, then the other one will be used. +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 unsquash [OPTIONS]` ###### **Options:**