@@ -45,13 +45,13 @@ func (self Pipe) right() int {
4545 return max (self .fromPos , self .toPos )
4646}
4747
48- func RenderCommitGraph (commits []* models.Commit , selectedCommitHash * string , getStyle func (c * models.Commit ) style.TextStyle ) []string {
48+ func RenderCommitGraph (commits []* models.Commit , selectedCommitHashPtr * string , getStyle func (c * models.Commit ) style.TextStyle ) []string {
4949 pipeSets := GetPipeSets (commits , getStyle )
5050 if len (pipeSets ) == 0 {
5151 return nil
5252 }
5353
54- lines := RenderAux (pipeSets , commits , selectedCommitHash )
54+ lines := RenderAux (pipeSets , commits , selectedCommitHashPtr )
5555
5656 return lines
5757}
@@ -69,7 +69,7 @@ func GetPipeSets(commits []*models.Commit, getStyle func(c *models.Commit) style
6969 })
7070}
7171
72- func RenderAux (pipeSets [][]* Pipe , commits []* models.Commit , selectedCommitHash * string ) []string {
72+ func RenderAux (pipeSets [][]* Pipe , commits []* models.Commit , selectedCommitHashPtr * string ) []string {
7373 maxProcs := runtime .GOMAXPROCS (0 )
7474
7575 // splitting up the rendering of the graph into multiple goroutines allows us to render the graph in parallel
@@ -93,7 +93,7 @@ func RenderAux(pipeSets [][]*Pipe, commits []*models.Commit, selectedCommitHash
9393 if k > 0 {
9494 prevCommit = commits [k - 1 ]
9595 }
96- line := renderPipeSet (pipeSet , selectedCommitHash , prevCommit )
96+ line := renderPipeSet (pipeSet , selectedCommitHashPtr , prevCommit )
9797 innerLines = append (innerLines , line )
9898 }
9999 chunks [i ] = innerLines
@@ -272,7 +272,7 @@ func getNextPipes(prevPipes []*Pipe, commit *models.Commit, getStyle func(c *mod
272272
273273func renderPipeSet (
274274 pipes []* Pipe ,
275- selectedCommitHash * string ,
275+ selectedCommitHashPtr * string ,
276276 prevCommit * models.Commit ,
277277) string {
278278 maxPos := 0
@@ -319,10 +319,10 @@ func renderPipeSet(
319319 // we don't want to highlight two commits if they're contiguous. We only want
320320 // to highlight multiple things if there's an actual visible pipe involved.
321321 highlight := true
322- if prevCommit != nil && equalHashes (prevCommit .HashPtr (), selectedCommitHash ) {
322+ if prevCommit != nil && equalHashes (prevCommit .HashPtr (), selectedCommitHashPtr ) {
323323 highlight = false
324324 for _ , pipe := range pipes {
325- if equalHashes (pipe .fromHash , selectedCommitHash ) && (pipe .kind != TERMINATES || pipe .fromPos != pipe .toPos ) {
325+ if equalHashes (pipe .fromHash , selectedCommitHashPtr ) && (pipe .kind != TERMINATES || pipe .fromPos != pipe .toPos ) {
326326 highlight = true
327327 }
328328 }
@@ -331,7 +331,7 @@ func renderPipeSet(
331331 // so we have our commit pos again, now it's time to build the cells.
332332 // we'll handle the one that's sourced from our selected commit last so that it can override the other cells.
333333 selectedPipes , nonSelectedPipes := utils .Partition (pipes , func (pipe * Pipe ) bool {
334- return highlight && equalHashes (pipe .fromHash , selectedCommitHash )
334+ return highlight && equalHashes (pipe .fromHash , selectedCommitHashPtr )
335335 })
336336
337337 for _ , pipe := range nonSelectedPipes {
@@ -375,7 +375,7 @@ func renderPipeSet(
375375}
376376
377377func equalHashes (a , b * string ) bool {
378- // if our selectedCommitHash is nil, there is no selected commit
378+ // if our selectedCommitHashPtr is nil, there is no selected commit
379379 if a == nil || b == nil {
380380 return false
381381 }
0 commit comments