[openstack-dev] git commit message: change id will before bug/bp when first commit

Jeremy Stanley fungi at yuggoth.org
Sun Aug 18 16:52:12 UTC 2013

On 2013-08-18 14:25:22 +0800 (+0800), ZhiQiang Fan wrote:
> When submit code review in gerrit, i have been recommended put
> Fixes-Bug: #bug-id/Implement-Blueprint: #bp-desc before chang-id.
> However, when first run git commit in a seperate patch branch,
> the change-id will generate before bug/bp, it is automatically,
> so i have to use git commit --amend to modify the commit message
> and put bug/bp before chang-id.
> Is there any way to let Change-id generate after whole commit
> message? (more precisely, after bug/bp.)

Gerrit's Change-Id metadata header line doesn't need to be the very
last line, it just needs to be one of the lines in the last
paragraph of the commit message. This is standard for all metadata
headers including things common elsewhere like Signed-Off-By but the
same goes for our Fixes/Partial/Related-Bug and Implements-Blueprint
metadata headers as well. When used they should always appear
one-per-line in the final paragraph of the commit message, but their
relative order is unimportant.
Jeremy Stanley

More information about the OpenStack-dev mailing list