Hacker News
Reviewing Large Changes with Jujutsu
cube2222
|next
[-]
Unfortunately GitHub still doesn't make that easy, and branch `push --force`'s make it really hard to see what changed, would be amazing if they ever fixed that.
In general, I think with the rise of agentic coding, and more review work, I hope we see some innovation in the "code review tooling" space. Not AI reviewers (that's useful too but already works well enough)! I want tools that help the human review code faster, more effectively, and in a more pleasant way.
Of course can't end the comment without the obligatory "jj is great, big recommend, am not affiliated, check out the blog post I wrote a year ago for getting started with it[0]", ha! I'm still very happy with it, no going back.
[0]: https://kubamartin.com/posts/introduction-to-the-jujutsu-vcs...
tensegrist
|next
|previous
[-]
`c F` in the magit menu squashes staged changes directly into a commit in the log, and `c e` amends (which is to say squashing into the tip). So in this case I'd hit `s` to stage, and either `c e` or `c F j C-c C-c` (fixup, move one item down to get to HEAD^, confirm) — both of which are practically atomic operations for me at this point.
bananadonkey
|root
|parent
|next
[-]
rirze
|root
|parent
|previous
[-]
aneidon
|root
|parent
|next
[-]
anamexis
|root
|parent
|previous
[-]
pzmarzly
|next
|previous
[-]
jj new main -m review
jj new -m pr
jj git fetch
jj restore --from=big-change@origin .
Then keep squashing from `pr` to `review` as described in the article. When the PR gets a new version, rerun the last 2 commands.
sfink
|next
|previous
[-]
I guess I can see the appeal of working until there's nothing left, but you get that either way -- in my scheme, you go until there's nothing left to review in the original duplicate change, instead of in the working copy.
I guess it's not very different. Either way, you could use multiple review changes if the thing you're reviewing has several independent concerns tangled together (likely if the author is using git not jj!). I think mine might work slightly better if you get distracted and make some other unrelated change or a logging/debugging change to better understand the patch. That would get mixed into the patch you're trying to empty out with your scheme, but would stay in a review change with mine. (And obviously, you can always squash/split it somewhere else after the fact in either scheme, it just takes a manual step.)