Assuming the commit is HEAD and the entire message is exactly how you want it, 
except for the extra line, you should be able to do

git log --pretty=format:"%B" HEAD^..HEAD | sed -e '2,2d' -e '/^$/q' | sed -e 
'/^\s*$/d' | git commit --amend -F -

On Dec 21, 2015, at 11:32 PM, Matthew Ahrens <[email protected]> wrote:

It needs that format in illumos. So I would need to augment my script to remove 
the blank line when creating the illumos commit message. Let me know if you can 
help with that. 

--matt 

On Monday, December 21, 2015, ilove zfs <[email protected]> wrote:
Even when the original commit has a blank line after the subject, the finalized commits 
seem to always be missing the blank line after the subject. This ends up causing problems 
for git format-patch/git am, git log, git rebase, etc. because the "Reviewed 
by" section is treated as if it's part of the subject. I'm wondering if there's some 
change that could be made to the the RTI commit finalization process to ensure that a 
blank line makes it in there.


Example:
Without a blank line:
bash-3.2$ git log --pretty=format:"%s" HEAD^..HEAD
6529 Properly handle updates of variably-sized SA entries. Reviewed by: Brian Behlendorf 
<[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Reviewed by: Ned 
Bass <[email protected]> Reviewed by: Tim Chase <[email protected]>


With a blank line:
bash-3.2$ git log --pretty=format:"%s" HEAD^..HEAD
6529 Properly handle updates of variably-sized SA entries.


https://github.com/behlendorf/openzfs/commit/ba08234ca691208cc19ae447e6330f263bd93ea3.patch
https://github.com/illumos/illumos-gate/commit/e7e978b1f75353cb29673af9b35453c20c2827bf.patch
https://github.com/openzfs/openzfs/commit/4237281765aa7b431884ef4f566d98bbee07948c.patch

_______________________________________________
developer mailing list
[email protected]
http://lists.open-zfs.org/mailman/listinfo/developer

Reply via email to