From 1.20 release, we completely redesigned our old stacked PR model. Instead of mirroring each commits into PRs to make them individually reviewed, merged or abandoned, we just give way flexible diff model. Users can diff between arbitrary commits or interdiff between arbitrary versions. So technically "stacked PR" is gone. Commits are already stacked and giving well-designed interface to view & review it solves most of the scenarios.
But this still leave one limitation: #216: We can't share same change between PRs.
Many stacked PR implementations including GitHub solves this by literally stacking PRs, creating dependency graph, letting each branches to depend (be stacked) on others. Apart from the fact that we can't really follow same solution because tangled PRs are detached from their source branch by design, I also think that isn't really good way to do this. We already have commit DAG. Building similar DAG between branches on top of that makes everything hard to understand and super complicated.
Instead, we can literally share changes between PRs and make that clear. Same direction we took for 1.20 PR system redesign; expose internal model clearly with fine interface.
To achieve this, we should show these informations on PR page:
- On commit row: other PRs including this commit in their latest submission range
- On commit row: whether this commit is already merged into target branch (related: #4734)
- On discussion section: comments made from other PR but pinned to same jj-change
This needs some UI research before we proceed. I'm not sure if it's possible to build such interface and if it really solves the problem at all.