Check bad head and clean iw before StackTransaction
commit407bf0a244e3b39fc69081c5df8265d812b3fea1
authorPeter Grayson <pete@jpgrayson.net>
Tue, 2 Nov 2021 03:39:53 +0000 (1 23:39 -0400)
committerPeter Grayson <pete@jpgrayson.net>
Wed, 3 Nov 2021 13:38:59 +0000 (3 09:38 -0400)
tree0117405c519e28fc1aeafb3b2da221ab995cfb95
parent3ee9d485ea4eef86710c214d901eb9fa99dfc431
Check bad head and clean iw before StackTransaction

StackTransaction.__init__() no longer performs bad head or clean iw
checks. These checks are now performed explictly by the various commands
instead of relying on default arguments to StackTransaction.

This reduces the complexity of StackTransaction by avoiding side effects
in its initializer.

Signed-off-by: Peter Grayson <pete@jpgrayson.net>
24 files changed:
stgit/commands/branch.py
stgit/commands/clean.py
stgit/commands/commit.py
stgit/commands/common.py
stgit/commands/float.py
stgit/commands/goto.py
stgit/commands/hide.py
stgit/commands/imprt.py
stgit/commands/new.py
stgit/commands/pick.py
stgit/commands/pop.py
stgit/commands/push.py
stgit/commands/redo.py
stgit/commands/refresh.py
stgit/commands/repair.py
stgit/commands/reset.py
stgit/commands/sink.py
stgit/commands/squash.py
stgit/commands/sync.py
stgit/commands/uncommit.py
stgit/commands/undo.py
stgit/commands/unhide.py
stgit/lib/edit.py
stgit/lib/transaction.py