2

Gerrit generated a Change-Id in commit message. Is it possible to search for a commit by this Change-Id?

tvbinstinct
  • 105
  • 1
  • 10

3 Answers3

1

The trick is search by "message:" instead of "change:". Change-Id is part of the commit message and searchable. "change:" must refer to some other field.

tvbinstinct
  • 105
  • 1
  • 10
1

You can also do this search using the Gerrit query command line.

All forms below are equivalent:

  • ssh -p 29418 your.gerrit.com gerrit query --format=JSON 8958202
  • ssh -p 29418 your.gerrit.com gerrit query --format=JSON change:'8958202'
  • ssh -p 29418 your.gerrit.com gerrit query --format=JSON change:'I3054034b91597e54f84f3fa2c4afbcc9f8b60e63'

Tested with gerrit v2.14

0

I found this easy way :

https://<your.gerrit.com>/plugins/gitiles/<BranchName>/+/<CommitID>

Hope this will be useful.

Darshan Bhat
  • 245
  • 1
  • 11