···3template:
4slug: stacking
5title: jujutsu-style code review
6-subtitle: we now support jujutsu style "interdiff" code-review!
7date: 2025-06-02
8image: /static/img/hidden-ref.png
9authors:
···49[a] some small refactor
50```
5152-And when only *newly added commits* are easy to review, this
53is what ends up happening:
5455```
···86This has the downside of clobbering the output of `git
87blame` (if there is a bug in the new feature, you will first
88land on `e`, and upon digging further, you will land on
89-`b`).
0909192## the interdiff model
9394With jujutsu however, you have the tools at hand to
95fearlessly edit, split, squash and rework old commits (you
96-could do this with git if you are familiar with fixup
97-commits or interactive rebasing).
9899Let's try that again:
100···206 <a href="static/img/top_of_stack.jpeg">
207 <img class="my-1 h-auto max-w-full" src="static/img/top_of_stack.jpeg">
208 </a>
209- <figcaption class="text-center">The "stack" attachment is similar to Gerrit's relation chain</figcaption>
210</figure>
211212After a while, I receive a couple of review comments, but
···272$ jj edit so
273274# hack, hack, hack
275-276-$ jj log
277-@ so set: introduce set difference push-soqmukrvport*
278-├ sq set: introduce set intersection
279-├ mk set: introduce set union
280-├ my set: introduce basic set operations
281-~
282```
283284We are done addressing reviews, let us push our code:
···288 Move sideways bookmark push-soqmukrvport from fc06362295bd to dfe2750f6d40
289```
290291-Upon resubmitting the PR for review:
00292293<div class="flex justify-center items-start gap-2">
294 <figure class="w-1/2 m-0 flex flex-col items-center">
···3template:
4slug: stacking
5title: jujutsu-style code review
6+subtitle: tangled now supports jujutsu change-ids!
7date: 2025-06-02
8image: /static/img/hidden-ref.png
9authors:
···49[a] some small refactor
50```
5152+And when only newly added commits are easy to review, this
53is what ends up happening:
5455```
···86This has the downside of clobbering the output of `git
87blame` (if there is a bug in the new feature, you will first
88land on `e`, and upon digging further, you will land on
89+`b`). This becomes incredibly tricky to navigate if reviews
90+go on through multiple cycles.
919293## the interdiff model
9495With jujutsu however, you have the tools at hand to
96fearlessly edit, split, squash and rework old commits (you
97+can absolutely achieve this with git and interactive
98+rebasing, but it is certainly not trivial).
99100Let's try that again:
101···207 <a href="static/img/top_of_stack.jpeg">
208 <img class="my-1 h-auto max-w-full" src="static/img/top_of_stack.jpeg">
209 </a>
210+ <figcaption class="text-center">The "stack" is similar to Gerrit's relation chain</figcaption>
211</figure>
212213After a while, I receive a couple of review comments, but
···273$ jj edit so
274275# hack, hack, hack
0000000276```
277278We are done addressing reviews, let us push our code:
···282 Move sideways bookmark push-soqmukrvport from fc06362295bd to dfe2750f6d40
283```
284285+Upon resubmitting the PR for review, Tangled is able to
286+accurately map every change in the resubmitted branch to its
287+original PR, using jujutsu change-ids:
288289<div class="flex justify-center items-start gap-2">
290 <figure class="w-1/2 m-0 flex flex-col items-center">