Miserable Variable
Miserable Variable

Reputation: 28752

How to identify commits that bypassed gerrit

My knowledge of git is minimal, apologize in advance for any wrong terminology use.

I know that git push origin HEAD:refs/for/master creates a gerrit review and git push origin HEAD:master pushes to the remote repository, bypassing gerrit.

How do I identify commits that were pushed straight to the remote git repository, bypassing gerrit?

Upvotes: 1

Views: 164

Answers (1)

saver
saver

Reputation: 400

You may use Gerrit Query feature to get information about code reviews. For example:

  1. get a list of all your commits;
  2. try to query information about each commit in list by running ssh ${GERRIT_HOST} gerrit query --all-reviewers project:${PROJECTNAME} commit:${COMMIT_HASH};
  3. if result is empty, then commit has been pushed directly, without code review;

Upvotes: 1

Related Questions