summaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorKristijan Husak <husakkristijan@gmail.com>2018-10-06 07:40:12 +0200
committerKristijan Husak <husakkristijan@gmail.com>2018-10-06 09:53:54 +0200
commit5f7ac97a39cf473823e290acfe59a01dfa031625 (patch)
tree6405d3ef585d67958b3ca23f91e9e006173db2d1 /pkg
parent28fe3d6cf989e9fe40292a5b40ed9bc2a8cdeaa6 (diff)
Refresh side panels and use uppercase HEAD in all git commands that requires it.
Diffstat (limited to 'pkg')
-rw-r--r--pkg/commands/git.go6
-rw-r--r--pkg/gui/files_panel.go2
2 files changed, 4 insertions, 4 deletions
diff --git a/pkg/commands/git.go b/pkg/commands/git.go
index 4539e4431..87ee69c8c 100644
--- a/pkg/commands/git.go
+++ b/pkg/commands/git.go
@@ -221,11 +221,11 @@ func (c *GitCommand) ResetHard() error {
// UpstreamDifferenceCount checks how many pushables/pullables there are for the
// current branch
func (c *GitCommand) UpstreamDifferenceCount() (string, string) {
- pushableCount, err := c.OSCommand.RunCommandWithOutput("git rev-list @{u}..head --count")
+ pushableCount, err := c.OSCommand.RunCommandWithOutput("git rev-list @{u}..HEAD --count")
if err != nil {
return "?", "?"
}
- pullableCount, err := c.OSCommand.RunCommandWithOutput("git rev-list head..@{u} --count")
+ pullableCount, err := c.OSCommand.RunCommandWithOutput("git rev-list HEAD..@{u} --count")
if err != nil {
return "?", "?"
}
@@ -236,7 +236,7 @@ func (c *GitCommand) UpstreamDifferenceCount() (string, string) {
// to the remote branch of the current branch, a map is returned to ease look up
func (c *GitCommand) GetCommitsToPush() map[string]bool {
pushables := map[string]bool{}
- o, err := c.OSCommand.RunCommandWithOutput("git rev-list @{u}..head --abbrev-commit")
+ o, err := c.OSCommand.RunCommandWithOutput("git rev-list @{u}..HEAD --abbrev-commit")
if err != nil {
return pushables
}
diff --git a/pkg/gui/files_panel.go b/pkg/gui/files_panel.go
index d76ba5791..b16492dfd 100644
--- a/pkg/gui/files_panel.go
+++ b/pkg/gui/files_panel.go
@@ -224,7 +224,7 @@ func (gui *Gui) handleAmendCommitPress(g *gocui.Gui, filesView *gocui.View) erro
gui.createErrorPanel(g, err.Error())
}
- return gui.refreshFiles(g)
+ return gui.refreshSidePanels(g)
}, nil)
}