From 794d014fae9a78bd8664e6628a20902bd6dc767a Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Fri, 28 Sep 2018 23:51:47 +0200 Subject: bug: define a hash-based identifier for an operation --- bug/op_set_title.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bug/op_set_title.go') 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 -- cgit