Skip to content

FR: Add an --insert-after/-A flag to jj commit #7811

@YPares

Description

@YPares

Is your feature request related to a problem? Please describe.
Currently, jj commit always creates a new revision as if jj new -d @ was called. This means the new revision will be created "outside" the potentially existing descendancy lineage.

The fact that this flag doesn't exist for jj commit means I almost never use it (I'm basically always editing something mid-history, having "future" revisions that represent Todo or WIP work).

Describe the solution you'd like
I'd like to be able to do jj commit -A which creates the new commit between the current one an all its children, just as jj new -A @ works.

Describe alternatives you've considered
Calling separately jj desc and jj new -A, but that's less convenient.
That can also be done by doing jj split . -m "Commit message", which creates a children commit with empty changes on top of the current one. But that children is not really a fresh new revision: it contains the whole evolog of the original commit that got split, which makes the evolog harder to use afterwards (and the more you go on creating new revisions by splitting, the worse it gets).

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