Also note that there are 2 kinds of SHA-1 hashes, there is the Change-ID sha-1 hash of the
merge request that is pushed to gerrit (afaik stays persisent after amending patches), and
then there is the sha-1 hash of the commit itself into the repository.
Quick overview of my observations:
== Gerrit change numbers ==
- Specific to gerrit, requires gerrit to get/resolve them (might become problematic in
long-term if we drop gerrit)
- Not usable in git cli
* One id per change set, not per patch/commit/amend
+ Easy to link in bugzilla ("gerrit( change) #")
+ Link to it can be copied from the address bar in Gerrit
Example links:
*
https://gerrit.wikimedia.org/r/5852
*
https://gerrit.wikimedia.org/r/#q,5852,n,z
*
https://gerrit.wikimedia.org/r/#change,5852
== Gerrit Change-Id (SHA-1) ==
- Specific to gerrit, requires gerrit to get/resolve them (might become problematic in
long-term if we drop gerrit)
- Not usable in git cli
* One id per change set, not per patch/commit/amend
+ Are included in the commit message
+ Link to it can be copied from the parsed commit message in Gerrit
+ Allows easy tracking of merges of the same change to a different branch, for example:
https://gerrit.wikimedia.org/r/#q,Icc924785cdb394adc723666bf9f6a67e9d6a4d0d…
(same Change-Id sha1 for the merge from master to wmf/1.20wmf1, but different git commit
sha-1)
Example link:
*
https://gerrit.wikimedia.org/r/#q,I18752aa0fe21dd3c5bc5bd4a830faaa4c836f9cd…
== Git commit sha-1 ==
* Specific to each commit, changes after each amend. But all are tracable to the change
numbers
+ Not dependant on Gerrit, but gerrit can handle them fine with the #q search
+ Usable in git cli
+ Link to it can be copied from the patch set on the gerrit change page "Patch set #
<hash>"
Example links:
*
https://gerrit.wikimedia.org/r/#q,8d6b19d8c2ed041443b9433298aa08a187ad1d83,…
*
https://gerrit.wikimedia.org/r/gitweb?p=mediawiki%2Fcore.git;a=commit;h=8d6…
- Krinkle