Searching Gerrit by Commit Message

Deadly 提交于 2019-12-12 08:21:12

问题


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.


回答1:


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




回答2:


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.



来源:https://stackoverflow.com/questions/14409413/searching-gerrit-by-commit-message

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!