Skip to content

FR: Rebase working copy when importing moved parent changes #7632

@tingerrr

Description

@tingerrr

Is your feature request related to a problem? Please describe.
Assuming the following topology and a remote.

@
|
A
|
| C trunk()
|/
B
|
~

When A changes on the remote while retaining its change ID (like with a web UI triggered rebase on GitHub, or rewriting of A on another machine), it is correctly imported as a new version of A when fetching. So far, so good. This leaves you with this new topology:

@
|
| A
|/
| C trunk()
|/
B
|
~

It would be great if jj would keep the working copy up to date with its newly updated parent A, rebasing it automatically to preserve the original topology.

Especially with that last sentence, it seems that this must've been in some form intentional, as it is slightly inconsistent to not update a descendant when rewriting a change from an import vs a local operation, but I could not find a discussion about this specific case.

Describe the solution you'd like
I would like to arrive at the same topology after fetching, when jj fetches the new version of A it should rebase its descendants just like as if I mutated A locally.

@
|
A
|
| C trunk()
|/
B
|
~

Describe alternatives you've considered
Keep it as, as changes to ignore files could potentially disrupt some people's working copies.

Additional context
This is related to #1039, but not quite the same, jj git sync would explicitly rebase changes whose ancestor hasn't changed.

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