Skip to content

Commit

Permalink
Clarify squashing working-copy commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyapoz committed Aug 5, 2023
1 parent aae14b2 commit 5eb1c0c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cli/src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,9 @@ struct DuplicateArgs {
/// 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.
///
/// Note that if you abandon the working-copy commit, a new empty working-copy commit will be created
/// If you want to remove empty commit from the top of history, use jj unstash.
#[derive(clap::Args, Clone, Debug)]
struct AbandonArgs {
/// The revision(s) to abandon
Expand Down Expand Up @@ -581,6 +584,10 @@ struct MoveArgs {
/// 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.
///
/// Note that if squashing the working-copy commit results in abandoning of empty commit,
/// a new empty commit will still be created as a working copy commit.
/// If you want to continue working on the squashed commit, use jj edit @-. This will abandon the empty commit.
#[derive(clap::Args, Clone, Debug)]
#[command(visible_alias = "amend")]
struct SquashArgs {
Expand Down

0 comments on commit 5eb1c0c

Please sign in to comment.