diff options
author | Sladyn <gunnerforlife00@gmail.com> | 2019-02-28 02:49:35 +0530 |
---|---|---|
committer | Sladyn <gunnerforlife00@gmail.com> | 2019-03-02 23:04:45 +0530 |
commit | 43e56692e832bcb4ef39f745ec9fbaf7360052de (patch) | |
tree | 0cae5fa06e23e193d881c94a250ab6205c016c34 /cache/bug_excerpt.go | |
parent | 7260ca05bc3588c0572887a7d8f1b897c7fc13da (diff) | |
download | git-bug-43e56692e832bcb4ef39f745ec9fbaf7360052de.tar.gz |
ls.go:`git bug ls` should be faster
Added `Title` to BugExcerpt
Added `TitleFilter` to `filter.go`
Used BugExcerpt in `ls` command to improve performance.
Closes https://github.com/MichaelMure/git-bug/issues/98
Diffstat (limited to 'cache/bug_excerpt.go')
-rw-r--r-- | cache/bug_excerpt.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cache/bug_excerpt.go b/cache/bug_excerpt.go index fd06e51b..eae90f5a 100644 --- a/cache/bug_excerpt.go +++ b/cache/bug_excerpt.go @@ -23,8 +23,10 @@ type BugExcerpt struct { CreateUnixTime int64 EditUnixTime int64 - Status bug.Status - Labels []bug.Label + Title string + Status bug.Status + NoOfComments int + Labels []bug.Label // If author is identity.Bare, LegacyAuthor is set // If author is identity.Identity, AuthorId is set and data is deported @@ -48,8 +50,10 @@ func NewBugExcerpt(b bug.Interface, snap *bug.Snapshot) *BugExcerpt { EditLamportTime: b.EditLamportTime(), CreateUnixTime: b.FirstOp().GetUnixTime(), EditUnixTime: snap.LastEditUnix(), + Title: snap.Title, Status: snap.Status, Labels: snap.Labels, + NoOfComments: len(snap.Comments), CreateMetadata: b.FirstOp().AllMetadata(), } |