···2atroot: true
3template:
4slug: stacking
5-title: jujutsu-style code review
6subtitle: tangled now supports jujutsu change-ids!
7date: 2025-06-02
8image: /static/img/hidden-ref.png
···20as reviews are addressed. We set out to natively support
21this model of code-review on Tangled.
2223-If you're new to Tangled, [read our intro](/intro) for more
24-about the project.
2526For starters, I would like to contrast the two schools of
27code-review, the "diff-soup" model and the interdiff model.
2829-## the diff soup model
3031When you create a PR on traditional code forges (GitHub
32specifically), the UX implicitly encourages you to address
···124[a] some small refactor
125```
126127-This is the most important part:
128-129-```
130-Rebased 2 descendant commits onto updated working copy
131-```
132-133Jujutsu automatically rebases the descendants without having
134to lift a finger. Brilliant! You can repeat the same
135exercise for all review comments, and effectively, your
136PR will have evolved like so:
137138```
139- a -> b -> c
140 | | |
141 v v v
142- a' -> b' -> c'
143```
144145## the catch
···155156Jujutsu however, works around this by assigning stable
157"change id"s to each change (which internally point to a git
158-commit, if you use the git backing). If you edit an old
159-commit, its SHA changes, but its change-id remains the same.
160161And this is the essence of our new stacked PRs feature!
162···210 <figcaption class="text-center">The "stack" is similar to Gerrit's relation chain</figcaption>
211</figure>
212213-After a while, I receive a couple of review comments, but
214-not on my entire submission, but rather, on each *individual
215change*. Additionally, the reviewer is happy with my first
216change, and has gone ahead and merged that:
217···275# hack, hack, hack
276```
277278-We are done addressing reviews, let us push our code:
279```
280$ jj git push
281Changes to push to origin:
···283```
284285Upon 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">
···2atroot: true
3template:
4slug: stacking
5+title: jujutsu on tangled
6subtitle: tangled now supports jujutsu change-ids!
7date: 2025-06-02
8image: /static/img/hidden-ref.png
···20as reviews are addressed. We set out to natively support
21this model of code-review on Tangled.
2223+Tangled is a new social-enabled Git collaboration platform,
24+[read our intro](/intro) for more about the project.
2526For starters, I would like to contrast the two schools of
27code-review, the "diff-soup" model and the interdiff model.
2829+## the diff-soup model
3031When you create a PR on traditional code forges (GitHub
32specifically), the UX implicitly encourages you to address
···124[a] some small refactor
125```
126000000127Jujutsu automatically rebases the descendants without having
128to lift a finger. Brilliant! You can repeat the same
129exercise for all review comments, and effectively, your
130PR will have evolved like so:
131132```
133+ a -> b -> c initial attempt
134 | | |
135 v v v
136+ a' -> b' -> c' after first cycle of reviews
137```
138139## the catch
···149150Jujutsu however, works around this by assigning stable
151"change id"s to each change (which internally point to a git
152+commit, if you use the git backing). If you edit a commit,
153+its SHA changes, but its change-id remains the same.
154155And this is the essence of our new stacked PRs feature!
156···204 <figcaption class="text-center">The "stack" is similar to Gerrit's relation chain</figcaption>
205</figure>
206207+After a while, I receive a couple of review comments, not on
208+my entire submission, but rather, on each *individual
209change*. Additionally, the reviewer is happy with my first
210change, and has gone ahead and merged that:
211···269# hack, hack, hack
270```
271272+We are done addressing reviews:
273```
274$ jj git push
275Changes to push to origin:
···277```
278279Upon resubmitting the PR for review, Tangled is able to
280+accurately trace the commit across rewrites, using jujutsu
281+change-ids, and map it to the corresponding PR:
282283<div class="flex justify-center items-start gap-2">
284 <figure class="w-1/2 m-0 flex flex-col items-center">
static/img/review_difference.jpeg
This is a binary file and will not be displayed.
static/img/review_union.jpeg
This is a binary file and will not be displayed.
+3-1
templates/partials/footer.html
···1<div class="mt-16 px-6 py-4 bg-white dark:bg-gray-800 drop-shadow-sm rounded-t">
2 <p class="text-center">
3 <a class="font-bold italic no-underline hover:no-underline" href="https://tangled.sh">
4- tangled.sh
5 </a>
6 is a new social-enabled Git collaboration platform built on top of the <a href="https://atproto.com/">AT Protocol</a>.
7 </p>
···15 <a href="https://bsky.app/profile/tangled.sh">Bluesky</a>
16 ·
17 <a href="/blog/feed.xml">RSS</a>
0018 </div>
19</div>
···1<div class="mt-16 px-6 py-4 bg-white dark:bg-gray-800 drop-shadow-sm rounded-t">
2 <p class="text-center">
3 <a class="font-bold italic no-underline hover:no-underline" href="https://tangled.sh">
4+ tangled
5 </a>
6 is a new social-enabled Git collaboration platform built on top of the <a href="https://atproto.com/">AT Protocol</a>.
7 </p>
···15 <a href="https://bsky.app/profile/tangled.sh">Bluesky</a>
16 ·
17 <a href="/blog/feed.xml">RSS</a>
18+ ·
19+ <a href="https://tangled.sh/@tangled.sh/core">Source</a>
20 </div>
21</div>