Our team uses a standard of prefixing all commit messages with "bz12345:" (where 12345 is replaced by the bug you're working on) and I'd like to be able to search for all commits that have that bug number.
I've read http://gerrit.googlecode.com/svn/documentation/2.1.6/user-search.html over and over and haven't figured out a way to search for commit message titles. Does anybody have a trick for searching the first line of a commit message for arbitrary text? None of message:, tr:, and bug: work.
If needed this commit can be fetched from Gerrit by using the fetch command from the download commands in the change screen. It is important that the commit message contains the Change-Id of the change that should be updated as a footer (last paragraph).
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. Save this answer.
Visit Gerrit then select Projects --> List --> SELECT-PROJECT --> Branches .
Show activity on this post. Where <changeid> is the Gerrit change-id or change number. This will show you all the comments, including inline comments from files, associated with the current patch set. You can replace --current-patch-set with --patch-sets to see this for all patch sets.
Ah, I figured it out. You MUST have a status:
query too. For example, this works:
status:merged message:bz12345
This does not:
message:bz12345
This could be because we're on an older version of Gerrit (2.2.1 I think).
message:bz12345 should work.
See the latest documentation
Note that it searches the whole message body though, not just the subject.
message:'MESSAGE'
Changes that match MESSAGE arbitrary string in the commit message body.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With