We are often rebasing changes with no real modification. For example when correcting a typo in a commit message or child changes being automatically rebased when one of their ancestor as been altered.
OpenStack is using a python script that detect such trivial rebase and will send a comment to each changes mentioning it. That might help us a bit when doing code review.
The python script is at:
Can be installed in /var/lib/gerrit/scripts/ and added to the patchset-created hook script:
timeout -k 2m 10m python /usr/local/gerrit/scripts/trivial_rebase.py \
patchset-created \ --whitespace \ --private-key-path=<SSH HOST KEY OF TRIVIAL USER> \ --role-user=trivial-rebase@gerrit.wikimedia.org "$@"
Example output somewhere in comments of https://review.openstack.org/#/c/12324/
Trivial Rebase Oct 8
Patch Set 5:
New patchset patch-id matches previous patchset, but whitespace content has changed.
Version: unspecified
Severity: enhancement