aboutsummaryrefslogtreecommitdiffstats
path: root/bug/op_set_title.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-09-28 23:51:47 +0200
committerMichael Muré <batolettre@gmail.com>2018-09-29 00:51:54 +0200
commit794d014fae9a78bd8664e6628a20902bd6dc767a (patch)
tree059fe4469787f792b6ddc4c29e6232c4263ece53 /bug/op_set_title.go
parent1bf268cebc84a9de1e538cbb54bcc0f434022192 (diff)
downloadgit-bug-794d014fae9a78bd8664e6628a20902bd6dc767a.tar.gz
bug: define a hash-based identifier for an operation
Diffstat (limited to 'bug/op_set_title.go')
-rw-r--r--bug/op_set_title.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/bug/op_set_title.go b/bug/op_set_title.go
index e8c5caf8..a4912143 100644
--- a/bug/op_set_title.go
+++ b/bug/op_set_title.go
@@ -4,6 +4,7 @@ import (
"fmt"
"strings"
+ "github.com/MichaelMure/git-bug/util/git"
"github.com/MichaelMure/git-bug/util/text"
)
@@ -21,6 +22,10 @@ func (op SetTitleOperation) base() *OpBase {
return op.OpBase
}
+func (op SetTitleOperation) Hash() (git.Hash, error) {
+ return hashOperation(op)
+}
+
func (op SetTitleOperation) Apply(snapshot Snapshot) Snapshot {
snapshot.Title = op.Title