mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-29 22:48:24 +02:00
Store fromHash/toHash in Pipe struct as pointers
Now that commit hashes are stored in a pool and referenced by pointer by the commits, we can use those same pointers in the pipes.
This commit is contained in:
@@ -46,11 +46,11 @@ func NewSubCommitsContext(
|
||||
return [][]string{}
|
||||
}
|
||||
|
||||
selectedCommitHash := ""
|
||||
var selectedCommitHashPtr *string
|
||||
if c.Context().Current().GetKey() == SUB_COMMITS_CONTEXT_KEY {
|
||||
selectedCommit := viewModel.GetSelected()
|
||||
if selectedCommit != nil {
|
||||
selectedCommitHash = selectedCommit.Hash()
|
||||
selectedCommitHashPtr = selectedCommit.HashPtr()
|
||||
}
|
||||
}
|
||||
branches := []*models.Branch{}
|
||||
@@ -72,7 +72,7 @@ func NewSubCommitsContext(
|
||||
c.UserConfig().Gui.ShortTimeFormat,
|
||||
time.Now(),
|
||||
c.UserConfig().Git.ParseEmoji,
|
||||
selectedCommitHash,
|
||||
selectedCommitHashPtr,
|
||||
startIdx,
|
||||
endIdx,
|
||||
shouldShowGraph(c),
|
||||
|
||||
Reference in New Issue
Block a user