mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-29 00:51:35 +02:00
add Commit.ParentRefName()
This commit is contained in:
committed by
Jesse Duffield
parent
99ecc1cfdf
commit
30be50b641
@ -178,6 +178,11 @@ func (self *CommitLoader) extractCommitFromLine(line string) *models.Commit {
|
||||
|
||||
unitTimestampInt, _ := strconv.Atoi(unixTimestamp)
|
||||
|
||||
parents := []string{}
|
||||
if len(parentHashes) > 0 {
|
||||
parents = strings.Split(parentHashes, " ")
|
||||
}
|
||||
|
||||
return &models.Commit{
|
||||
Sha: sha,
|
||||
Name: message,
|
||||
@ -185,7 +190,7 @@ func (self *CommitLoader) extractCommitFromLine(line string) *models.Commit {
|
||||
ExtraInfo: extraInfo,
|
||||
UnixTimestamp: int64(unitTimestampInt),
|
||||
Author: author,
|
||||
Parents: strings.Split(parentHashes, " "),
|
||||
Parents: parents,
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user