diff options
author | David Chen <weichen2000121@gmail.com> | 2020-02-26 18:40:54 -0800 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-02-27 18:05:41 +1100 |
commit | a9fe0b80008dbeec196115fe5cc36535f19f5316 (patch) | |
tree | 5cc28a5f1839e0a9a3e0beb629b26af854298136 /pkg/commands | |
parent | 5af7b0235e105ee05b9dae037719fbfd0a15c1dc (diff) |
set --abbrev-commit to return 8-digit hash stringsv0.15.6
Diffstat (limited to 'pkg/commands')
-rw-r--r-- | pkg/commands/commit_list_builder.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/commands/commit_list_builder.go b/pkg/commands/commit_list_builder.go index d4dce7433..a31657b34 100644 --- a/pkg/commands/commit_list_builder.go +++ b/pkg/commands/commit_list_builder.go @@ -105,7 +105,7 @@ func (c *CommitListBuilder) GetCommits(limit bool) ([]*Commit, error) { // now we can split it up and turn it into commits for _, line := range utils.SplitLines(log) { commit := c.extractCommitFromLine(line) - _, unpushed := unpushedCommits[commit.Sha[:7]] + _, unpushed := unpushedCommits[commit.Sha[:8]] commit.Status = map[bool]string{true: "unpushed", false: "pushed"}[unpushed] commits = append(commits, commit) } @@ -298,7 +298,7 @@ func (c *CommitListBuilder) getMergeBase() (string, error) { // to the remote branch of the current branch, a map is returned to ease look up func (c *CommitListBuilder) getUnpushedCommits() 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 --abbrev=8") if err != nil { return pushables } |