Skip to content

Commit

Permalink
cli: add "absorb" machinery and command
Browse files Browse the repository at this point in the history
The destination commits are selected based on annotation, which I think is
basically the same as "hg absorb" (except for handling of consecutive hunks.)
However, we don't compute a full interleaved delta right now, and the hunks are
merged in the same way as "jj squash". This means absorbed hunks might produce
conflicts if no context lines exist. Still I think this is more intuitive than
selecting destination commits based on patch commutativity.

I've left inline comments to the tests where behavior is different from "hg
absorb", but these aren't exhaustively checked.

Closes #170
  • Loading branch information
yuja committed Nov 11, 2024
1 parent 3144a8c commit ce3436b
Show file tree
Hide file tree
Showing 7 changed files with 1,856 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
* The `jj desc` and `jj st` aliases are now hidden to not interfere with shell
completion. They remain available.

* New command `jj absorb` that moves changes to stack of mutable revisions.

* New command `jj util exec` that can be used for arbitrary aliases.

* A preview of improved shell completions was added. Please refer to the
Expand Down
Loading

0 comments on commit ce3436b

Please sign in to comment.