mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-31 23:19:40 +02:00
get whole commit SHA from rebase commits
This commit is contained in:
parent
efb26f8b60
commit
71e018a3dd
@ -190,7 +190,7 @@ func (c *CommitListBuilder) getInteractiveRebasingCommits() ([]*Commit, error) {
|
|||||||
}
|
}
|
||||||
splitLine := strings.Split(line, " ")
|
splitLine := strings.Split(line, " ")
|
||||||
commits = append([]*Commit{{
|
commits = append([]*Commit{{
|
||||||
Sha: splitLine[1][0:7],
|
Sha: splitLine[1],
|
||||||
Name: strings.Join(splitLine[2:], " "),
|
Name: strings.Join(splitLine[2:], " "),
|
||||||
Status: "rebasing",
|
Status: "rebasing",
|
||||||
Action: splitLine[0],
|
Action: splitLine[0],
|
||||||
@ -207,7 +207,7 @@ func (c *CommitListBuilder) getInteractiveRebasingCommits() ([]*Commit, error) {
|
|||||||
// Subject: second commit on master
|
// Subject: second commit on master
|
||||||
func (c *CommitListBuilder) commitFromPatch(content string) (*Commit, error) {
|
func (c *CommitListBuilder) commitFromPatch(content string) (*Commit, error) {
|
||||||
lines := strings.Split(content, "\n")
|
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: ")
|
name := strings.TrimPrefix(lines[3], "Subject: ")
|
||||||
return &Commit{
|
return &Commit{
|
||||||
Sha: sha,
|
Sha: sha,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user