It is a bit of a pain to get everything all set up, but once you do, you can use moz-git-tools [1] to just do:
git bz attach -e HEAD
...and then it will figure out which bug to attach it to, bring up a little file to edit so you can change the commit message, and it will automatically attach the patch to the bug. You can also set reviewer flags, obsolete other patches, etc., at the same time.
git bz attach -e HEAD
...and then it will figure out which bug to attach it to, bring up a little file to edit so you can change the commit message, and it will automatically attach the patch to the bug. You can also set reviewer flags, obsolete other patches, etc., at the same time.
[1] https://github.com/mozilla/moz-git-tools