Stacked Diffs: Phabricator's Influence on Code Review Workflows

Greg Foster
Greg Foster
Graphite software engineer

Stacked diffs, also known as stacked changes or dependent changes, refer to a series of code changes where each change is based on the code of the previous one. This allows developers to break down large features or changes into smaller, more manageable reviews.

The typical workflow for stacked diffs involves:

  1. Creating a base diff that introduces the initial set of changes.

  2. Stacking subsequent diffs on top of the base diff, each depending on the changes introduced by the previous diff.

  3. Reviewing and landing changes one at a time, starting from the base and moving up the stack.

Phabricator introduced a structured way to manage stacked diffs through Differential, its code review tool, and Arcanist, the command-line interface.

  • Differential supports the creation and management of diffs, handling dependencies between diffs transparently.

  • It allows reviewers to see the context of each diff in a stack, focusing on the incremental changes rather than the entire codebase.

  • Arcanist facilitates the creation of stacked diffs with commands like arc diff, which can automatically recognize and manage dependencies.

  • It streamlines the process of updating stacked diffs, handling the intricate rebasing and updating that can often be involved.

Phabricator's approach to stacked diffs has had several significant influences on code review culture:

  • Incremental Reviews: Encouraged the practice of breaking down complex features into smaller, more digestible pieces for review.

  • Collaboration: Fostered a more collaborative environment where reviewers can provide feedback early and often throughout the development process.

  • Efficiency: Improved the efficiency of the review process by allowing parallel work on dependent changes without waiting for a full merge.

While Phabricator was instrumental in pioneering the stacked diffs workflow, other tools and platforms have since adopted and adapted this concept:

  • Popularization: The stacked diffs workflow has become more widespread, with other development platforms integrating similar functionalities.

  • Innovation: The concept has evolved, with the community building upon and refining the workflow, leading to new tools and integrations that further streamline the process.

Phabricator's introduction of the stacked diffs workflow marked a pivotal moment in the evolution of code review practices. It demonstrated a powerful model for managing complex changesets, which has since been embraced and expanded upon by the software development community. The legacy of Phabricator's approach to stacked diffs continues to influence and inform the development workflows and tools of today, underscoring the importance of iterative, incremental, and collaborative code reviews in the pursuit of software excellence.

Stay unblocked. Ship faster.
Experience the new developer workflow - create, review, and merge code continuously. Get started with one command.
Get started

Give your PR workflow
an upgrade today

Stack easier | Ship smaller | Review quicker

Or install our CLI.
Product Screenshot 1
Product Screenshot 2