Searching Gerrit by Commit Message

Jed Anderson picture Jed Anderson · Jan 19, 2013 · Viewed 19.8k times · Source

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.

Answer

Jed Anderson picture Jed Anderson · Jan 21, 2013

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).