Learning center

When does a Gerrit approval count on a new patch set?

Check the project’s label copy condition and the currently applied vote. A label on the latest patch set can come from a direct vote or from an earlier vote copied under that condition. Record the distinction when a reviewer’s action must be tied to the exact code they saw.

Try a rebase and a code change#

Suppose the branch policy copies positive Code-Review votes for a trivial rebase. The maintainer votes on patch set 1. The author rebases without changing the patch and uploads patch set 2. If Gerrit classifies the update as a trivial rebase and the configured condition matches, the vote can carry forward. Next, the author changes a default timeout and uploads patch set 3. The tool should show what the host actually did with that same vote under the policy.

Inspect both updates in a fixture project using the intended label configuration. Record which patch set received the direct vote and which one currently counts it. If a change in code requires a new judgment under your process, make the separate requirement explicit before relying on the tool’s summary. Gerrit sticky votes and label copy conditions

Use the change and patch set identifiers to keep the two votes referable even after the next upload.

One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. Eligibility and fair-use terms.

Start free with GitHub

Related reading