chiark / gitweb /
Convert "stg edit" to the new infrastructure
The --annotate and --undo switches were dropped in the conversion.
--annotate could be re-added, but --undo is more problematic since the
command will now rewrite any applied patches on top of the edited
patch. It seems best to leave this job to the fabled general undo
command, expected Real Soon Now.
In addition to the usual improvements from the new infrastructure,
this patch has some additional benefits:
* There's a new -e/--edit flag, which forces interactive editing
even if options such as --sign or --author are given. (Normally,
interactive editing is skipped if the patch is modified with a
commandline option.)
* It's now possible to edit any patch, including unapplied patches.
Even diff editing works for all patches, including unapplied
patches. (In fact, editing unapplied patches is slightly safer,
since they don't mind a dirty index/worktree.)
Signed-off-by: Karl Hasselström <kha@treskal.com>