@@ -646,32 +646,32 @@ func TestCommitLoader_extractCommitFromLine(t *testing.T) {
646646 expectedNil : true ,
647647 },
648648 {
649- testName : "minimal valid line with 5 fields" ,
649+ testName : "malformed line with only 5 fields" ,
650650 line : "hash\x00 timestamp\x00 author\x00 email\x00 parents" ,
651651 showDivergence : false ,
652- expectedNil : false ,
652+ expectedNil : true ,
653653 },
654654 {
655- testName : "line with 6 fields including divergence " ,
655+ testName : "malformed line with only 6 fields" ,
656656 line : "hash\x00 timestamp\x00 author\x00 email\x00 parents\x00 <" ,
657657 showDivergence : true ,
658- expectedNil : false ,
658+ expectedNil : true ,
659659 },
660660 {
661- testName : "line with 7 fields including extraInfo but no message" ,
661+ testName : "minimal valid line with 7 fields ( no message) " ,
662662 line : "hash\x00 timestamp\x00 author\x00 email\x00 parents\x00 >\x00 extraInfo" ,
663663 showDivergence : true ,
664664 expectedNil : false ,
665665 },
666666 {
667- testName : "line missing divergence field when expected " ,
668- line : "hash\x00 timestamp\x00 author\x00 email\x00 parents" ,
667+ testName : "minimal valid line with 7 fields (empty extraInfo) " ,
668+ line : "hash\x00 timestamp\x00 author\x00 email\x00 parents\x00 > \x00 " ,
669669 showDivergence : true ,
670670 expectedNil : false ,
671671 },
672672 {
673- testName : "line missing extraInfo and message fields" ,
674- line : "hash\x00 timestamp\x00 author\x00 email\x00 parents\x00 <" ,
673+ testName : "valid line with 8 fields (complete) " ,
674+ line : "hash\x00 timestamp\x00 author\x00 email\x00 parents\x00 <\x00 extraInfo \x00 message " ,
675675 showDivergence : true ,
676676 expectedNil : false ,
677677 },
0 commit comments