summaryrefslogtreecommitdiffstats
path: root/pkg/gui/commits_panel.go
diff options
context:
space:
mode:
authorAnthony HAMON <hamon.anth@gmail.com>2018-09-18 20:53:32 +0200
committerAnthony HAMON <hamon.anth@gmail.com>2018-09-20 09:09:37 +0200
commitbdeb78c9a04963847ffd90c2277b3a274e3ba309 (patch)
treed1a754e857836a156e6180a9d35323595c53689c /pkg/gui/commits_panel.go
parent9481920101c7f8e29875e6db2642fe2b317564f9 (diff)
commands/git : returns an error instead of panicing
Diffstat (limited to 'pkg/gui/commits_panel.go')
-rw-r--r--pkg/gui/commits_panel.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/gui/commits_panel.go b/pkg/gui/commits_panel.go
index 7c09559ff..91bb334ff 100644
--- a/pkg/gui/commits_panel.go
+++ b/pkg/gui/commits_panel.go
@@ -68,7 +68,10 @@ func (gui *Gui) handleCommitSelect(g *gocui.Gui, v *gocui.View) error {
}
return gui.renderString(g, "main", gui.Tr.SLocalize("NoCommitsThisBranch"))
}
- commitText := gui.GitCommand.Show(commit.Sha)
+ commitText, err := gui.GitCommand.Show(commit.Sha)
+ if err != nil {
+ return err
+ }
return gui.renderString(g, "main", commitText)
}