diff options
author | Michael Muré <michael.mure@consensys.net> | 2019-03-27 21:44:11 +0100 |
---|---|---|
committer | Michael Muré <michael.mure@consensys.net> | 2019-03-27 21:44:11 +0100 |
commit | 24d6714dd59a5c385c21991caa47e5727de043d0 (patch) | |
tree | 154306261bf98b599e1f3465940bb46c290b8c72 /termui | |
parent | d27e3849b826309bdf2dbf6f30f2a8ac9db71649 (diff) | |
download | git-bug-24d6714dd59a5c385c21991caa47e5727de043d0.tar.gz |
cache: properly push/pull identities and bugs
Diffstat (limited to 'termui')
-rw-r--r-- | termui/bug_table.go | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/termui/bug_table.go b/termui/bug_table.go index 69634151..50991f2e 100644 --- a/termui/bug_table.go +++ b/termui/bug_table.go @@ -4,8 +4,8 @@ import ( "bytes" "fmt" - "github.com/MichaelMure/git-bug/bug" "github.com/MichaelMure/git-bug/cache" + "github.com/MichaelMure/git-bug/entity" "github.com/MichaelMure/git-bug/util/colors" "github.com/MichaelMure/git-bug/util/text" "github.com/MichaelMure/gocui" @@ -435,8 +435,6 @@ func (bt *bugTable) openBug(g *gocui.Gui, v *gocui.View) error { } func (bt *bugTable) pull(g *gocui.Gui, v *gocui.View) error { - // Note: this is very hacky - ui.msgPopup.Activate("Pull from remote "+defaultRemote, "...") go func() { @@ -457,19 +455,19 @@ func (bt *bugTable) pull(g *gocui.Gui, v *gocui.View) error { var buffer bytes.Buffer beginLine := "" - for merge := range bt.repo.MergeAll(defaultRemote) { - if merge.Status == bug.MergeStatusNothing { + for result := range bt.repo.MergeAll(defaultRemote) { + if result.Status == entity.MergeStatusNothing { continue } - if merge.Err != nil { + if result.Err != nil { g.Update(func(gui *gocui.Gui) error { ui.msgPopup.Activate(msgPopupErrorTitle, err.Error()) return nil }) } else { _, _ = fmt.Fprintf(&buffer, "%s%s: %s", - beginLine, colors.Cyan(merge.Bug.HumanId()), merge, + beginLine, colors.Cyan(result.Entity.HumanId()), result, ) beginLine = "\n" |