@@ -261,15 +261,15 @@ func TestRenderPipeSet(t *testing.T) {
261
261
262
262
tests := []struct {
263
263
name string
264
- pipes []* Pipe
264
+ pipes []Pipe
265
265
commit * models.Commit
266
266
prevCommit * models.Commit
267
267
expectedStr string
268
268
expectedStyles []style.TextStyle
269
269
}{
270
270
{
271
271
name : "single cell" ,
272
- pipes : []* Pipe {
272
+ pipes : []Pipe {
273
273
{fromPos : 0 , toPos : 0 , fromHash : pool ("a" ), toHash : pool ("b" ), kind : TERMINATES , style : cyan },
274
274
{fromPos : 0 , toPos : 0 , fromHash : pool ("b" ), toHash : pool ("c" ), kind : STARTS , style : green },
275
275
},
@@ -279,7 +279,7 @@ func TestRenderPipeSet(t *testing.T) {
279
279
},
280
280
{
281
281
name : "single cell, selected" ,
282
- pipes : []* Pipe {
282
+ pipes : []Pipe {
283
283
{fromPos : 0 , toPos : 0 , fromHash : pool ("a" ), toHash : pool ("selected" ), kind : TERMINATES , style : cyan },
284
284
{fromPos : 0 , toPos : 0 , fromHash : pool ("selected" ), toHash : pool ("c" ), kind : STARTS , style : green },
285
285
},
@@ -289,7 +289,7 @@ func TestRenderPipeSet(t *testing.T) {
289
289
},
290
290
{
291
291
name : "terminating hook and starting hook, selected" ,
292
- pipes : []* Pipe {
292
+ pipes : []Pipe {
293
293
{fromPos : 0 , toPos : 0 , fromHash : pool ("a" ), toHash : pool ("selected" ), kind : TERMINATES , style : cyan },
294
294
{fromPos : 1 , toPos : 0 , fromHash : pool ("c" ), toHash : pool ("selected" ), kind : TERMINATES , style : yellow },
295
295
{fromPos : 0 , toPos : 0 , fromHash : pool ("selected" ), toHash : pool ("d" ), kind : STARTS , style : green },
@@ -303,7 +303,7 @@ func TestRenderPipeSet(t *testing.T) {
303
303
},
304
304
{
305
305
name : "terminating hook and starting hook, prioritise the terminating one" ,
306
- pipes : []* Pipe {
306
+ pipes : []Pipe {
307
307
{fromPos : 0 , toPos : 0 , fromHash : pool ("a" ), toHash : pool ("b" ), kind : TERMINATES , style : red },
308
308
{fromPos : 1 , toPos : 0 , fromHash : pool ("c" ), toHash : pool ("b" ), kind : TERMINATES , style : magenta },
309
309
{fromPos : 0 , toPos : 0 , fromHash : pool ("b" ), toHash : pool ("d" ), kind : STARTS , style : green },
@@ -317,7 +317,7 @@ func TestRenderPipeSet(t *testing.T) {
317
317
},
318
318
{
319
319
name : "starting and terminating pipe sharing some space" ,
320
- pipes : []* Pipe {
320
+ pipes : []Pipe {
321
321
{fromPos : 0 , toPos : 0 , fromHash : pool ("a1" ), toHash : pool ("a2" ), kind : TERMINATES , style : red },
322
322
{fromPos : 0 , toPos : 0 , fromHash : pool ("a2" ), toHash : pool ("a3" ), kind : STARTS , style : yellow },
323
323
{fromPos : 1 , toPos : 1 , fromHash : pool ("b1" ), toHash : pool ("b2" ), kind : CONTINUES , style : magenta },
@@ -332,7 +332,7 @@ func TestRenderPipeSet(t *testing.T) {
332
332
},
333
333
{
334
334
name : "starting and terminating pipe sharing some space, with selection" ,
335
- pipes : []* Pipe {
335
+ pipes : []Pipe {
336
336
{fromPos : 0 , toPos : 0 , fromHash : pool ("a1" ), toHash : pool ("selected" ), kind : TERMINATES , style : red },
337
337
{fromPos : 0 , toPos : 0 , fromHash : pool ("selected" ), toHash : pool ("a3" ), kind : STARTS , style : yellow },
338
338
{fromPos : 1 , toPos : 1 , fromHash : pool ("b1" ), toHash : pool ("b2" ), kind : CONTINUES , style : magenta },
@@ -347,7 +347,7 @@ func TestRenderPipeSet(t *testing.T) {
347
347
},
348
348
{
349
349
name : "many terminating pipes" ,
350
- pipes : []* Pipe {
350
+ pipes : []Pipe {
351
351
{fromPos : 0 , toPos : 0 , fromHash : pool ("a1" ), toHash : pool ("a2" ), kind : TERMINATES , style : red },
352
352
{fromPos : 0 , toPos : 0 , fromHash : pool ("a2" ), toHash : pool ("a3" ), kind : STARTS , style : yellow },
353
353
{fromPos : 1 , toPos : 0 , fromHash : pool ("b1" ), toHash : pool ("a2" ), kind : TERMINATES , style : magenta },
@@ -361,7 +361,7 @@ func TestRenderPipeSet(t *testing.T) {
361
361
},
362
362
{
363
363
name : "starting pipe passing through" ,
364
- pipes : []* Pipe {
364
+ pipes : []Pipe {
365
365
{fromPos : 0 , toPos : 0 , fromHash : pool ("a1" ), toHash : pool ("a2" ), kind : TERMINATES , style : red },
366
366
{fromPos : 0 , toPos : 0 , fromHash : pool ("a2" ), toHash : pool ("a3" ), kind : STARTS , style : yellow },
367
367
{fromPos : 0 , toPos : 3 , fromHash : pool ("a2" ), toHash : pool ("d3" ), kind : STARTS , style : yellow },
@@ -376,7 +376,7 @@ func TestRenderPipeSet(t *testing.T) {
376
376
},
377
377
{
378
378
name : "starting and terminating path crossing continuing path" ,
379
- pipes : []* Pipe {
379
+ pipes : []Pipe {
380
380
{fromPos : 0 , toPos : 0 , fromHash : pool ("a1" ), toHash : pool ("a2" ), kind : TERMINATES , style : red },
381
381
{fromPos : 0 , toPos : 0 , fromHash : pool ("a2" ), toHash : pool ("a3" ), kind : STARTS , style : yellow },
382
382
{fromPos : 0 , toPos : 1 , fromHash : pool ("a2" ), toHash : pool ("b3" ), kind : STARTS , style : yellow },
@@ -391,7 +391,7 @@ func TestRenderPipeSet(t *testing.T) {
391
391
},
392
392
{
393
393
name : "another clash of starting and terminating paths" ,
394
- pipes : []* Pipe {
394
+ pipes : []Pipe {
395
395
{fromPos : 0 , toPos : 0 , fromHash : pool ("a1" ), toHash : pool ("a2" ), kind : TERMINATES , style : red },
396
396
{fromPos : 0 , toPos : 0 , fromHash : pool ("a2" ), toHash : pool ("a3" ), kind : STARTS , style : yellow },
397
397
{fromPos : 0 , toPos : 1 , fromHash : pool ("a2" ), toHash : pool ("b3" ), kind : STARTS , style : yellow },
@@ -406,7 +406,7 @@ func TestRenderPipeSet(t *testing.T) {
406
406
},
407
407
{
408
408
name : "commit whose previous commit is selected" ,
409
- pipes : []* Pipe {
409
+ pipes : []Pipe {
410
410
{fromPos : 0 , toPos : 0 , fromHash : pool ("selected" ), toHash : pool ("a2" ), kind : TERMINATES , style : red },
411
411
{fromPos : 0 , toPos : 0 , fromHash : pool ("a2" ), toHash : pool ("a3" ), kind : STARTS , style : yellow },
412
412
},
@@ -418,7 +418,7 @@ func TestRenderPipeSet(t *testing.T) {
418
418
},
419
419
{
420
420
name : "commit whose previous commit is selected and is a merge commit" ,
421
- pipes : []* Pipe {
421
+ pipes : []Pipe {
422
422
{fromPos : 0 , toPos : 0 , fromHash : pool ("selected" ), toHash : pool ("a2" ), kind : TERMINATES , style : red },
423
423
{fromPos : 1 , toPos : 1 , fromHash : pool ("selected" ), toHash : pool ("b3" ), kind : CONTINUES , style : red },
424
424
},
@@ -430,7 +430,7 @@ func TestRenderPipeSet(t *testing.T) {
430
430
},
431
431
{
432
432
name : "commit whose previous commit is selected and is a merge commit, with continuing pipe inbetween" ,
433
- pipes : []* Pipe {
433
+ pipes : []Pipe {
434
434
{fromPos : 0 , toPos : 0 , fromHash : pool ("selected" ), toHash : pool ("a2" ), kind : TERMINATES , style : red },
435
435
{fromPos : 1 , toPos : 1 , fromHash : pool ("z1" ), toHash : pool ("z3" ), kind : CONTINUES , style : green },
436
436
{fromPos : 2 , toPos : 2 , fromHash : pool ("selected" ), toHash : pool ("b3" ), kind : CONTINUES , style : red },
@@ -443,7 +443,7 @@ func TestRenderPipeSet(t *testing.T) {
443
443
},
444
444
{
445
445
name : "when previous commit is selected, not a merge commit, and spawns a continuing pipe" ,
446
- pipes : []* Pipe {
446
+ pipes : []Pipe {
447
447
{fromPos : 0 , toPos : 0 , fromHash : pool ("a1" ), toHash : pool ("a2" ), kind : TERMINATES , style : red },
448
448
{fromPos : 0 , toPos : 0 , fromHash : pool ("a2" ), toHash : pool ("a3" ), kind : STARTS , style : green },
449
449
{fromPos : 0 , toPos : 1 , fromHash : pool ("a2" ), toHash : pool ("b3" ), kind : STARTS , style : green },
@@ -486,25 +486,25 @@ func TestGetNextPipes(t *testing.T) {
486
486
pool := func (s string ) * string { return hashPool .Add (s ) }
487
487
488
488
tests := []struct {
489
- prevPipes []* Pipe
489
+ prevPipes []Pipe
490
490
commit * models.Commit
491
- expected []* Pipe
491
+ expected []Pipe
492
492
}{
493
493
{
494
- prevPipes : []* Pipe {
494
+ prevPipes : []Pipe {
495
495
{fromPos : 0 , toPos : 0 , fromHash : pool ("a" ), toHash : pool ("b" ), kind : STARTS , style : style .FgDefault },
496
496
},
497
497
commit : models .NewCommit (hashPool , models.NewCommitOpts {
498
498
Hash : "b" ,
499
499
Parents : []string {"c" },
500
500
}),
501
- expected : []* Pipe {
501
+ expected : []Pipe {
502
502
{fromPos : 0 , toPos : 0 , fromHash : pool ("a" ), toHash : pool ("b" ), kind : TERMINATES , style : style .FgDefault },
503
503
{fromPos : 0 , toPos : 0 , fromHash : pool ("b" ), toHash : pool ("c" ), kind : STARTS , style : style .FgDefault },
504
504
},
505
505
},
506
506
{
507
- prevPipes : []* Pipe {
507
+ prevPipes : []Pipe {
508
508
{fromPos : 0 , toPos : 0 , fromHash : pool ("a" ), toHash : pool ("b" ), kind : TERMINATES , style : style .FgDefault },
509
509
{fromPos : 0 , toPos : 0 , fromHash : pool ("b" ), toHash : pool ("c" ), kind : STARTS , style : style .FgDefault },
510
510
{fromPos : 0 , toPos : 1 , fromHash : pool ("b" ), toHash : pool ("d" ), kind : STARTS , style : style .FgDefault },
@@ -513,21 +513,21 @@ func TestGetNextPipes(t *testing.T) {
513
513
Hash : "d" ,
514
514
Parents : []string {"e" },
515
515
}),
516
- expected : []* Pipe {
516
+ expected : []Pipe {
517
517
{fromPos : 0 , toPos : 0 , fromHash : pool ("b" ), toHash : pool ("c" ), kind : CONTINUES , style : style .FgDefault },
518
518
{fromPos : 1 , toPos : 1 , fromHash : pool ("b" ), toHash : pool ("d" ), kind : TERMINATES , style : style .FgDefault },
519
519
{fromPos : 1 , toPos : 1 , fromHash : pool ("d" ), toHash : pool ("e" ), kind : STARTS , style : style .FgDefault },
520
520
},
521
521
},
522
522
{
523
- prevPipes : []* Pipe {
523
+ prevPipes : []Pipe {
524
524
{fromPos : 0 , toPos : 0 , fromHash : pool ("a" ), toHash : pool ("root" ), kind : TERMINATES , style : style .FgDefault },
525
525
},
526
526
commit : models .NewCommit (hashPool , models.NewCommitOpts {
527
527
Hash : "root" ,
528
528
Parents : []string {},
529
529
}),
530
- expected : []* Pipe {
530
+ expected : []Pipe {
531
531
{fromPos : 1 , toPos : 1 , fromHash : pool ("root" ), toHash : pool (models .EmptyTreeCommitHash ), kind : STARTS , style : style .FgDefault },
532
532
},
533
533
},
0 commit comments