summaryrefslogtreecommitdiff
path: root/backend.go
diff options
context:
space:
mode:
Diffstat (limited to 'backend.go')
-rw-r--r--backend.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/backend.go b/backend.go
index c91d0ac..cb3439e 100644
--- a/backend.go
+++ b/backend.go
@@ -90,9 +90,9 @@ func (b *Backend) Do(cmd Cmd) error {
}
switch {
- case !cmdIs(cmd, cmdClassInCommit):
+ case !cmdIs(noopReaderState{}, cmd, cmdClassInCommit):
_, b.inCommit = cmd.(CmdCommit)
- case !b.inCommit && !cmdIs(cmd, cmdClassCommand):
+ case !b.inCommit && !cmdIs(noopReaderState{}, cmd, cmdClassCommand):
panic(errors.Errorf("Cannot issue commit sub-command outside of a commit: %[1]T(%#[1]v)", cmd))
}