diff options
Diffstat (limited to 'backend.go')
-rw-r--r-- | backend.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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)) } |