martinvonz / jj

A Git-compatible VCS that is both simple and powerful
https://martinvonz.github.io/jj/
Apache License 2.0
7.24k stars 240 forks source link

`jj rebase --after` does not maintain order of parents #3969

Open mlcui-corp opened 6 days ago

mlcui-corp commented 6 days ago

Steps to Reproduce the Problem

$ jj
@    qont three (merge)
├─╮
│ ○  tpzo two
○ │  wouy one
├─╯
│ ○  vzkp four
├─╯

$ jj rebase -r v --after w
Rebased 1 commits onto destination
Rebased 1 descendant commits
Working copy now at: qont three (merge)
Parent commit      : tpzo two
Parent commit      : vzkp four

$ jj
@    qont three (merge)
├─╮
│ ○  vzkp four
│ ○  wouy one
○ │  tpzo two
├─╯

Expected Behavior

@ has parents four (vzkp), then two (tpzo).

Actual Behavior

@ has parents two (tpzo), then four (vzkp).

Specifications