1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +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
// 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
}