1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-17 00:18:05 +02:00

Refresh side panels and use uppercase HEAD in all git commands that requires it.

This commit is contained in:
Kristijan Husak
2018-10-06 07:40:12 +02:00
parent 28fe3d6cf9
commit 5f7ac97a39
2 changed files with 4 additions and 4 deletions

View File

@ -221,11 +221,11 @@ func (c *GitCommand) ResetHard() error {
// UpstreamDifferenceCount checks how many pushables/pullables there are for the // UpstreamDifferenceCount checks how many pushables/pullables there are for the
// current branch // current branch
func (c *GitCommand) UpstreamDifferenceCount() (string, string) { 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 { if err != nil {
return "?", "?" 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 { if err != nil {
return "?", "?" 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 // to the remote branch of the current branch, a map is returned to ease look up
func (c *GitCommand) GetCommitsToPush() map[string]bool { func (c *GitCommand) GetCommitsToPush() map[string]bool {
pushables := 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 { if err != nil {
return pushables return pushables
} }

View File

@ -224,7 +224,7 @@ func (gui *Gui) handleAmendCommitPress(g *gocui.Gui, filesView *gocui.View) erro
gui.createErrorPanel(g, err.Error()) gui.createErrorPanel(g, err.Error())
} }
return gui.refreshFiles(g) return gui.refreshSidePanels(g)
}, nil) }, nil)
} }