···33template:
44slug: stacking
55title: jujutsu-style code review
66-subtitle: we now support jujutsu style "interdiff" code-review!
66+subtitle: tangled now supports jujutsu change-ids!
77date: 2025-06-02
88image: /static/img/hidden-ref.png
99authors:
···4949[a] some small refactor
5050```
51515252-And when only *newly added commits* are easy to review, this
5252+And when only newly added commits are easy to review, this
5353is what ends up happening:
54545555```
···8686This has the downside of clobbering the output of `git
8787blame` (if there is a bug in the new feature, you will first
8888land on `e`, and upon digging further, you will land on
8989-`b`).
8989+`b`). This becomes incredibly tricky to navigate if reviews
9090+go on through multiple cycles.
909191929293## the interdiff model
93949495With jujutsu however, you have the tools at hand to
9596fearlessly edit, split, squash and rework old commits (you
9696-could do this with git if you are familiar with fixup
9797-commits or interactive rebasing).
9797+can absolutely achieve this with git and interactive
9898+rebasing, but it is certainly not trivial).
989999100Let's try that again:
100101···206207 <a href="static/img/top_of_stack.jpeg">
207208 <img class="my-1 h-auto max-w-full" src="static/img/top_of_stack.jpeg">
208209 </a>
209209- <figcaption class="text-center">The "stack" attachment is similar to Gerrit's relation chain</figcaption>
210210+ <figcaption class="text-center">The "stack" is similar to Gerrit's relation chain</figcaption>
210211</figure>
211212212213After a while, I receive a couple of review comments, but
···272273$ jj edit so
273274274275# hack, hack, hack
275275-276276-$ jj log
277277-@ so set: introduce set difference push-soqmukrvport*
278278-├ sq set: introduce set intersection
279279-├ mk set: introduce set union
280280-├ my set: introduce basic set operations
281281-~
282276```
283277284278We are done addressing reviews, let us push our code:
···288282 Move sideways bookmark push-soqmukrvport from fc06362295bd to dfe2750f6d40
289283```
290284291291-Upon resubmitting the PR for review:
285285+Upon resubmitting the PR for review, Tangled is able to
286286+accurately map every change in the resubmitted branch to its
287287+original PR, using jujutsu change-ids:
292288293289<div class="flex justify-center items-start gap-2">
294290 <figure class="w-1/2 m-0 flex flex-col items-center">