Read Anthropic’s case study about Graphite Reviewer

Gerrit's Approach to Code Review

Greg Foster
Greg Foster
Graphite software engineer

Gerrit, fundamentally designed for the collaborative review of changes, enforces a structured and rigorous workflow for code contributions. Here’s how Gerrit streamlines the code review management:

  • Atomic Changes: Gerrit encourages the submission of atomic commits, facilitating reviews that are focused and detailed.

  • Change Sets: Each change set is an independent entity, which simplifies tracking and managing reviews for each contribution.

  • Inline Comments: This feature allows reviewers to annotate specific lines or blocks of code, fostering detailed feedback and discussion.

  • Patch Sets: Gerrit's handling of iterative changes, or 'patch sets,' allows for a clear historical view of the evolution of a code review.

  • Threaded Discussions: Discussions within Gerrit are threaded by line and file, making it easy to follow the conversation.

  • Review Labels: Gerrit allows the use of custom labels for reviews, such as 'Verified', 'Code-Style', etc., providing a nuanced status of the review process.

What sets Gerrit apart in the landscape of code review tools is a combination of its rigorous review process, integration capabilities, and its powerful command-line tools:

  • Integration with Continuous Integration (CI): Gerrit has a strong relationship with CI systems like Jenkins, allowing for automated testing to be integrated into the review process, so only changes that pass tests can be merged.

  • Permission Controls: It provides granular access control settings to manage permissions at the branch, tag, and repository level.

  • Command-Line Interface: 'ssh' and 'RESTful' APIs are available for scripting and command-line interactions, making it possible to integrate with other tools or to automate certain aspects of the workflow.

  • Gating Changes: Gerrit can be configured to require that changes meet certain criteria before merging, ensuring code quality and adherence to project standards.

Gerrit is designed to support various types of development workflows, including both a centralized workflow similar to Subversion and a more distributed workflow similar to Git. Its flexibility allows organizations to implement a code review process that best fits their needs:

  • Proactive Reviews: Gerrit facilitates pre-commit code reviews, ensuring that feedback is received and incorporated before changes are merged into the codebase.

  • Post-commit Reviews: Gerrit also supports a post-commit review process for changes that have been directly pushed to the repository.

Gerrit’s code review management system is a powerful asset for teams that prioritize a thorough, transparent, and structured review process. Its emphasis on individual changes, rather than on complete features or branches, offers a more granular level of control. With a suite of features that encourage best practices and maintain high standards, Gerrit stands out as a specialized tool for projects and teams committed to achieving excellence in code quality.

Git inspired
Graphite's CLI and VS Code extension make working with Git effortless.
Learn more

Graphite
Git stacked on GitHub

Stacked pull requests are easier to read, easier to write, and easier to manage.
Teams that stack ship better software, faster.

Or install our CLI.
Product Screenshot 1
Product Screenshot 2