@@ -590,20 +590,20 @@ boolean hasFileBasedTags() {
590
590
return true ;
591
591
}
592
592
593
- private TagEntry buildTagEntry (File directory , String tags , boolean interactive ) throws HistoryException , IOException {
593
+ private TagEntry buildTagEntry (File directory , String tag , boolean interactive ) {
594
594
ArrayList <String > argv = new ArrayList <>();
595
595
ensureCommand (CMD_PROPERTY_KEY , CMD_FALLBACK );
596
596
argv .add (RepoCommand );
597
597
argv .add ("log" );
598
- argv .add ("--format=commit:%H" + System . getProperty ( "line.separator" )
599
- + "Date:%at " );
600
- argv .add ("-r " );
601
- argv .add (tags + "^.." + tags );
598
+ argv .add ("--format=commit:%H%nDate:%at" );
599
+ argv . add ( "-n " );
600
+ argv .add ("1 " );
601
+ argv .add (tag );
602
602
603
603
Executor executor = new Executor (argv , directory , interactive ?
604
604
RuntimeEnvironment .getInstance ().getInteractiveCommandTimeout () :
605
605
RuntimeEnvironment .getInstance ().getCommandTimeout ());
606
- GitTagParser parser = new GitTagParser (tags );
606
+ GitTagParser parser = new GitTagParser (tag );
607
607
executor .exec (true , parser );
608
608
return parser .getEntries ().first ();
609
609
}
@@ -645,21 +645,11 @@ protected void buildTagList(File directory, boolean interactive) {
645
645
this .tagList = null ;
646
646
}
647
647
648
- try {
649
- // Now get hash & date for each tag
650
- for (String tags : tagsList ) {
651
- TagEntry tagEntry = buildTagEntry (directory , tags , interactive );
652
- // Reverse the order of the list
653
- this .tagList .add (tagEntry );
654
- }
655
- } catch (HistoryException e ) {
656
- LOGGER .log (Level .WARNING ,
657
- "Failed to parse tag list: {0}" , e .getMessage ());
658
- this .tagList = null ;
659
- } catch (IOException e ) {
660
- LOGGER .log (Level .WARNING ,
661
- "Failed to read tag list: {0}" , e .getMessage ());
662
- this .tagList = null ;
648
+ // Now get hash & date for each tag.
649
+ for (String tag : tagsList ) {
650
+ TagEntry tagEntry = buildTagEntry (directory , tag , interactive );
651
+ // Reverse the order of the list
652
+ this .tagList .add (tagEntry );
663
653
}
664
654
}
665
655
0 commit comments