From 71e018a3dd01af4cb12c18b2e73ed34d6ce3b010 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Thu, 13 Feb 2020 17:59:14 +1100 Subject: get whole commit SHA from rebase commits --- pkg/commands/commit_list_builder.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/commands/commit_list_builder.go b/pkg/commands/commit_list_builder.go index 73d52e4f7..8eee0d5ec 100644 --- a/pkg/commands/commit_list_builder.go +++ b/pkg/commands/commit_list_builder.go @@ -190,7 +190,7 @@ func (c *CommitListBuilder) getInteractiveRebasingCommits() ([]*Commit, error) { } splitLine := strings.Split(line, " ") commits = append([]*Commit{{ - Sha: splitLine[1][0:7], + Sha: splitLine[1], Name: strings.Join(splitLine[2:], " "), Status: "rebasing", Action: splitLine[0], @@ -207,7 +207,7 @@ func (c *CommitListBuilder) getInteractiveRebasingCommits() ([]*Commit, error) { // Subject: second commit on master func (c *CommitListBuilder) commitFromPatch(content string) (*Commit, error) { lines := strings.Split(content, "\n") - sha := strings.Split(lines[0], " ")[1][0:7] + sha := strings.Split(lines[0], " ")[1] name := strings.TrimPrefix(lines[3], "Subject: ") return &Commit{ Sha: sha, -- cgit v1.2.3