aboutsummaryrefslogtreecommitdiffstats
path: root/bug/op_set_metadata.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-02-24 23:05:03 +0100
committerMichael Muré <batolettre@gmail.com>2019-03-01 22:52:54 +0100
commitc235d89d36500e58e3bcadda94e9cab06023dd55 (patch)
treec2ee84316886cca3e439dbc12f64d6a06ddd7c18 /bug/op_set_metadata.go
parent46beb4b886761ff69abe2ce45c2498a4fafe50d9 (diff)
downloadgit-bug-c235d89d36500e58e3bcadda94e9cab06023dd55.tar.gz
commands: show the last modification time in "user"
Diffstat (limited to 'bug/op_set_metadata.go')
-rw-r--r--bug/op_set_metadata.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/bug/op_set_metadata.go b/bug/op_set_metadata.go
index 57b78667..7616a591 100644
--- a/bug/op_set_metadata.go
+++ b/bug/op_set_metadata.go
@@ -2,6 +2,7 @@ package bug
import (
"encoding/json"
+ "fmt"
"github.com/MichaelMure/git-bug/identity"
"github.com/MichaelMure/git-bug/util/git"
@@ -55,6 +56,10 @@ func (op *SetMetadataOperation) Validate() error {
return err
}
+ if !op.Target.IsValid() {
+ return fmt.Errorf("target hash is invalid")
+ }
+
return nil
}