I have a following stuff in git log (from ssh://saper@gerrit.wikimedia.org:29418/test/mediawiki/extensions/examples):
commit 28f176ca9ca3767bfa9f0ec219f5fa0c299c5761 Merge: e2513b6 5c50ad6 Author: Demon chadh@wikimedia.org Date: Fri Mar 2 13:15:54 2012 +0000
Merge "Slight doc change as Git test"
commit 5c50ad62ebdee790735a29338aaec7bd9ad2c366 Author: jarry1250 jarry1250@gmail.com Date: Thu Mar 1 21:03:19 2012 +0000
Slight doc change as Git test
Change-Id: I2b646e25ece2a0e16f960628e256828a2e020324
commit e2513b6edecf491e5dde1baa999627f9012386eb Author: cmcmahon cmcmahon@wikimedia.org Date: Wed Feb 29 14:03:41 2012 -0700
set up new laptop
Change-Id: I6d99a2c2dcc4a78ac2f8359c6aadbec52dc58dd6
It seems that ^demon is allowed to commit without a "Change-Id" Fine.
I'd like to fetch the patches related to jarry1250 commit:
$ ssh -p 29418 saper@gerrit.wikimedia.org gerrit query 5c50ad62ebdee790735a29338aaec7bd9ad2c366 --patch-sets change I2b646e25ece2a0e16f960628e256828a2e020324 project: test/mediawiki/extensions/examples branch: master id: I2b646e25ece2a0e16f960628e256828a2e020324 number: 2913 subject: Slight doc change as Git test owner: name: Jarry1250 email: jarry1250@gmail.com url: https://gerrit.wikimedia.org/r/2913 lastUpdated: 2012-03-02 13:15:54 UTC sortKey: 001b6f1b00000b61 open: false status: MERGED patchSets: number: 1 revision: 5c50ad62ebdee790735a29338aaec7bd9ad2c366 ref: refs/changes/13/2913/1 uploader: name: Jarry1250 email: jarry1250@gmail.com
type: stats rowCount: 1 runTimeMilliseconds: 511
so I can now
$ git fetch ssh://saper@gerrit.wikimedia.org:29418/test/mediawiki/extensions/examples refs/changes/13/2913/1
From ssh://gerrit.wikimedia.org:29418/test/mediawiki/extensions/examples
* branch refs/changes/13/2913/1 -> FETCH_HEAD
$ git checkout -b r2913 FETCH_HEAD Switched to a new branch 'r2913
Now let's try the same with ^demon's commit:
$ ssh -p 29418 saper@gerrit.wikimedia.org gerrit query 28f176ca9ca3767bfa9f0ec219f5fa0c299c5761 --patch-sets type: stats rowCount: 0 runTimeMilliseconds: 429
It's just not there...
Same with another one:
$ ssh -p 29418 saper@gerrit.wikimedia.org gerrit query 17f028f7d0b73b777cc2a06d99b3538d2c95db09 --patch-sets type: stats rowCount: 0 runTimeMilliseconds: 429
Even if I listen all abandoned changes in the project:
$ ssh -p 29418 saper@gerrit.wikimedia.org gerrit query status:abandoned project:test/mediawiki/extensions/examples --patch-sets > r1
They are not there:
$ grep 28f176ca9ca3767bfa9f0ec219f5fa0c299c5761 r1 $ grep 17f028f7d0b73b777cc2a06d99b3538d2c95db09 r1
Seems like they are totally outside of gerrit. Pretty lame for a "gated trunk"!
//Saper
Marcin Cieslak wrote:
I have a following stuff in git log (from ssh://saper@gerrit.wikimedia.org:29418/test/mediawiki/extensions/examples):
commit 28f176ca9ca3767bfa9f0ec219f5fa0c299c5761 Merge: e2513b6 5c50ad6
^^^^^^
As you can see, that is a merge commit. It was made by gerrit on behalf of ^demon to merge commit 5c50ad6 which is change 2895.
It was merged as a follow up of e2513b6 which is change 2913 merged a few minutes before.
It seems that ^demon is allowed to commit without a "Change-Id" Fine.
Some people are allowed to merge change in the repository. In such a case it is not a change, but just applying a change to the repo.
It is pretty clear using git log with the --graph parameter:
* 28f176c Merge "Slight doc change as Git test" |\ | * 5c50ad6 Slight doc change as Git test * | e2513b6 set up new laptop |/ * 17f028f Merge "test: little docs addition" |\ | * 67042bb test: little docs addition * | fc51304 Taking credit for work I did not do. |/ * babfa18 Useful docs
You can try listing merge commits only with:
git log --oneline --graph --merges
And the history without merge is:
git log --oneline --graph --no-merges
wikitech-l@lists.wikimedia.org