Thanks to visit codestin.com
Credit goes to github.com

Skip to content

FR: Option for squash where you opt into each edit instead of opting out #6218

@whatisaphone

Description

@whatisaphone

Is your feature request related to a problem? Please describe.

In git, I liked to use the process of staging as code review/cleanup. I would stage a hunk, edit a bit, stage some more, edit, stage the rest and finally commit.

In jj I found a close analogue of this: jj new -B@ --no-edit, jj squash -i, edit a bit, jj squash -i, edit some more, and finally jj desc @-. The problem is jj squash defaults to including all changes, so it adds friction to a review workflow. I'll start out with 100 changes, jj squash -i and unapprove 99 changes, edit a bit, jj squash -i and unapprove 98 changes, edit more, jj squash -i and unapprove 97 changes, and so on.

Describe the solution you'd like

I'd like an option for jj squash that defaults to moving no edits, and lets the user opt in to edits one by one. With the option, JJ-INSTRUCTIONS might look something like this:

The left side of the diff shows the contents of the commit you're
moving changes from. The right side initially shows the contents of the
commit you're moving changes to.

Adjust the right side until the diff shows the changes you want to move
to the destination. If you don't make any changes, then the operation
will be aborted.

Describe alternatives you've considered

I read the docs and couldn't find anything close to this, but I'm open to anything I missed!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions