chiark / gitweb /
stg coalesce: Support --file and --save-template
--save-template was a bit tricky, because we want that
* if we reached the stage where the message is needed without
conflicts, the message should be written and no other side effects
should occur; but
* if we run into conflicts before reaching that point, behave just
as if --save-template was not given.
This makes this script
stg coalesce --save-template <patches>
if template was saved:
let user edit template
if user didn't abort:
stg coalesce --file <patches>
equivalent to
stg coalesce <patches>
with the added benefit that the user can abort the whole thing without
visible side effects.
Signed-off-by: Karl Hasselström <kha@treskal.com>