Maintaining a change log in a git commit message

Changes do not always get accepted upon initial submission. My current submission of the MCTP over PCC patch is at revision 37 and will likely have more. Previously, this patch was part of a series, and the change log was displayed in the series header email. However, now that I am down to a single patch, the change log should go in the email message with the patch attached.

It rturns out this is fairly simple to do: Puyt the change log at the =bottom of the commit message, after the Signed-Off-By tag. and after three dashes:

   Signed-off-by: Adam Young <admiyo@os.amperecomputing.com>
    
    ---
    Changes in V38:
    - Release all struct sk_buff messages in Mailbox ring buffer when Network device is stopped
    
    Changes in V37:
    
    - Free Channel in error case during init MTU.
    - Ensure Shared Buffer is > min-MTU + PCC Header

Git format patch will put all of this into the patch file. The Change log will have a line of three dashes at the start and at the end. When you run git am <patch> the information between the set of three dashes will be removed. The commit message will end with the Signed-off-by: line.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.