Hasty Briefsbeta

Bilingual

Reviewing Large Changes with Jujutsu

2 days ago
  • #code-review
  • #workflow
  • #version-control
  • The author has been using Jujutsu (jj) as a replacement for Git for the past 6 months and finds it highly effective for crafting clear and reviewable pull requests.
  • A new workflow is introduced for reviewing large pull requests, especially useful with the increasing size of pull requests due to coding agents.
  • The workflow involves duplicating a colleague's change with `jj duplicate`, creating an empty parent change with `jj new --no-edit --insert-before @`, and gradually squashing reviewed portions into the parent change.
  • This method allows tracking review progress with `jj diff --stat` and enables the reviewer to work in their familiar coding environment without frequent context switches to the web UI.
  • The workflow is demonstrated with an example, showing how to duplicate a change, create a review commit, and gradually squash reviewed files into it.
  • Benefits of using jj include intuitive tooling, reduced cognitive load compared to Git, and the ability to iteratively refine changes.
  • The workflow is compared to similar concepts in other systems like TigerBeetle and Jane Street's Iron, highlighting jj's advantages in handling conflicts and tracking changes.
  • The author mentions experimenting with leaving inline comments during the review and considering automating the process of sending comments to the PR.
  • A downside noted is the lack of complete IDE integration for jj, though the author uses a workaround by operating in 'colocated' mode.
  • Overall, the author is pleased with the workflow and jj, appreciating its ability to streamline the review process and reduce cognitive overhead.