diff options
Diffstat (limited to 'bug/op_set_title.go')
-rw-r--r-- | bug/op_set_title.go | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/bug/op_set_title.go b/bug/op_set_title.go index 31113943..7bebfadc 100644 --- a/bug/op_set_title.go +++ b/bug/op_set_title.go @@ -8,7 +8,6 @@ import ( "github.com/MichaelMure/git-bug/identity" "github.com/MichaelMure/git-bug/util/timestamp" - "github.com/MichaelMure/git-bug/util/git" "github.com/MichaelMure/git-bug/util/text" ) @@ -25,23 +24,16 @@ func (op *SetTitleOperation) base() *OpBase { return &op.OpBase } -func (op *SetTitleOperation) Hash() (git.Hash, error) { - return hashOperation(op) +func (op *SetTitleOperation) ID() string { + return idOperation(op) } func (op *SetTitleOperation) Apply(snapshot *Snapshot) { snapshot.Title = op.Title snapshot.addActor(op.Author) - hash, err := op.Hash() - if err != nil { - // Should never error unless a programming error happened - // (covered in OpBase.Validate()) - panic(err) - } - item := &SetTitleTimelineItem{ - hash: hash, + id: op.ID(), Author: op.Author, UnixTime: timestamp.Timestamp(op.UnixTime), Title: op.Title, @@ -139,15 +131,15 @@ func NewSetTitleOp(author identity.Interface, unixTime int64, title string, was } type SetTitleTimelineItem struct { - hash git.Hash + id string Author identity.Interface UnixTime timestamp.Timestamp Title string Was string } -func (s SetTitleTimelineItem) Hash() git.Hash { - return s.hash +func (s SetTitleTimelineItem) ID() string { + return s.id } // Sign post method for gqlgen |