diff options
Diffstat (limited to 'internal/git2go')
-rw-r--r-- | internal/git2go/gob.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/git2go/gob.go b/internal/git2go/gob.go index 7c4ef0554..9f9ff97b4 100644 --- a/internal/git2go/gob.go +++ b/internal/git2go/gob.go @@ -31,6 +31,7 @@ var registeredTypes = map[interface{}]struct{}{ FileNotFoundError(""): {}, InvalidArgumentError(""): {}, HasConflictsError{}: {}, + EmptyError{}: {}, IndexError(""): {}, } @@ -62,6 +63,14 @@ func (err HasConflictsError) Error() string { return "could not apply due to conflicts" } +// EmptyError indicates the command, for example cherry-pick, did result in no +// changes, so the result is empty. +type EmptyError struct{} + +func (err EmptyError) Error() string { + return "could not apply because the result was empty" +} + // SerializableError returns an error that is Gob serializable. // Registered types are serialized directly. Unregistered types // are transformed in to an opaque error using their error message. |