Repair stg mail with both -a and -e options
commit8eff12291ec8b75faace130dc4a318117d03b23b
authorPeter Grayson <pete@jpgrayson.net>
Sat, 2 May 2020 00:14:24 +0000 (1 20:14 -0400)
committerPeter Grayson <pete@jpgrayson.net>
Sat, 2 May 2020 00:39:08 +0000 (1 20:39 -0400)
treed8b92f56faa6ddcef9846aa5190eec0a6a8561f7
parent79cbf90a15f80a4f2d9d76b4df41450d81269686
Repair stg mail with both -a and -e options

Using both -a and -e (--all and --edit-cover) with `stg mail` triggered an
odd corner case where the args passed to __send_message() would be the list
of patches which caused a string interpolation to fail.

The repair is to make __send_message() somewhat less clever such that it
either handles msg_type == 'cover' or msg_type == 'patch', but not parts of
both simultaneously.

A test is added for this issue.

Repairs #58.

Signed-off-by: Peter Grayson <pete@jpgrayson.net>
stgit/commands/mail.py
t/t1900-mail.sh