diff options
author | Michael Muré <batolettre@gmail.com> | 2018-10-01 23:31:16 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-10-01 23:31:16 +0200 |
commit | 6ea6f3614e46a62f4a37c6afb488547a3d548191 (patch) | |
tree | 8a32431ce90dd8b169aac858b99a761b8f76c95f /cache/repo_cache.go | |
parent | f026f61aaaa7b9e579e99f171f7fefb38c4c6181 (diff) | |
download | git-bug-6ea6f3614e46a62f4a37c6afb488547a3d548191.tar.gz |
bug: in op convenience function, return the new op to be able to set metadata later
Diffstat (limited to 'cache/repo_cache.go')
-rw-r--r-- | cache/repo_cache.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cache/repo_cache.go b/cache/repo_cache.go index ecfb7131..74fc87c0 100644 --- a/cache/repo_cache.go +++ b/cache/repo_cache.go @@ -364,13 +364,13 @@ func (c *RepoCache) NewBugWithFiles(title string, message string, files []git.Ha // well as metadata for the Create operation. // The new bug is written in the repository (commit) func (c *RepoCache) NewBugRaw(author bug.Person, unixTime int64, title string, message string, files []git.Hash, metadata map[string]string) (*BugCache, error) { - b, err := bug.CreateWithFiles(author, unixTime, title, message, files) + b, op, err := bug.CreateWithFiles(author, unixTime, title, message, files) if err != nil { return nil, err } for key, value := range metadata { - b.FirstOp().SetMetadata(key, value) + op.SetMetadata(key, value) } err = b.Commit(c.repo) |