What does "--thor" mean?
To the OP: You might be able to simplify the script by using `git commit --trailer …`. Or maybe you tried that and it didn't display the message in the editor window satisfactorily?
For some reason `--trailer` is not available on my system, so I'd need to upgrade git, it seems.