@@ -519,10 +519,10 @@ public void testHistory() throws Exception {
519
519
assertEquals (8 , history .getHistoryEntries ().size ());
520
520
assertEquals (0 , history .getRenamedFiles ().size ());
521
521
522
- History expectedHistory = new History ( List .of (
522
+ List < HistoryEntry > entries = List .of (
523
523
new HistoryEntry ("84599b3c" , new Date (1485438707000L ),
524
524
"Kryštof Tulinger <[email protected] >" ,
null ,
525
- " renaming directories\n \n " , true ,
525
+ " renaming directories\n \n " , true ,
526
526
Set .of ("/git/moved2/renamed2.c" )),
527
527
new HistoryEntry ("67dfbe26" , new Date (1485263397000L ),
528
528
"Kryštof Tulinger <[email protected] >" ,
null ,
@@ -536,7 +536,7 @@ public void testHistory() throws Exception {
536
536
"Kryštof Tulinger <[email protected] >" ,
null ,
537
537
" moved renamed.c to new location\n \n " , true ,
538
538
Set .of ("/git/moved/renamed.c" )),
539
- new HistoryEntry ("ce4c98ec" , new Date (1485263232000L ),
539
+ new HistoryEntry ("ce4c98ec" , new Date (1485263232000L ), // start in the sub-test below
540
540
"Kryštof Tulinger <[email protected] >" ,
null ,
541
541
" adding simple file for renamed file testing\n \n " , true ,
542
542
Set .of ("/git/renamed.c" )),
@@ -551,7 +551,17 @@ public void testHistory() throws Exception {
551
551
new HistoryEntry ("bb74b7e8" , new Date (1218571573000L ),
552
552
"Trond Norbye <[email protected] >" ,
null ,
553
553
" Added a small test program\n \n " , true ,
554
- Set .of ("/git/Makefile" , "/git/header.h" , "/git/main.c" ))));
554
+ Set .of ("/git/Makefile" , "/git/header.h" , "/git/main.c" )));
555
+ History expectedHistory = new History (entries );
556
+ assertEquals (expectedHistory , history );
557
+
558
+ // Retry with start changeset.
559
+ history = gitrepo .getHistory (root , "ce4c98ec" );
560
+ assertNotNull (history );
561
+ assertNotNull (history .getHistoryEntries ());
562
+ assertEquals (4 , history .getHistoryEntries ().size ());
563
+ assertEquals (0 , history .getRenamedFiles ().size ());
564
+ expectedHistory = new History (entries .subList (0 , 4 ));
555
565
assertEquals (expectedHistory , history );
556
566
}
557
567
0 commit comments