1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +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:
Stefan Haller
2025-04-15 14:57:40 +02:00
parent 8d834e2eab
commit 13c21365c0
7 changed files with 126 additions and 112 deletions

View File

@ -51,7 +51,7 @@ func GetCommitListDisplayStrings(
shortTimeFormat string,
now time.Time,
parseEmoji bool,
selectedCommitHash string,
selectedCommitHashPtr *string,
startIdx int,
endIdx int,
showGraph bool,
@ -102,7 +102,7 @@ func GetCommitListDisplayStrings(
graphLines := graph.RenderAux(
graphPipeSets,
graphCommits,
selectedCommitHash,
selectedCommitHashPtr,
)
allGraphLines = append(allGraphLines, graphLines...)
}
@ -119,7 +119,7 @@ func GetCommitListDisplayStrings(
graphLines := graph.RenderAux(
graphPipeSets,
graphCommits,
selectedCommitHash,
selectedCommitHashPtr,
)
allGraphLines = append(allGraphLines, graphLines...)
}
@ -140,7 +140,7 @@ func GetCommitListDisplayStrings(
graphLines := graph.RenderAux(
graphPipeSets,
graphCommits,
selectedCommitHash,
selectedCommitHashPtr,
)
getGraphLine = func(idx int) string {
if idx >= graphOffset {