@@ -614,6 +614,26 @@ public boolean hasHistory(File file) {
614
614
return false ;
615
615
}
616
616
617
+ if (!repositoryHasHistory (file , repo )) {
618
+ return false ;
619
+ }
620
+
621
+ // This should return true for Annotate view.
622
+ Configuration .RemoteSCM globalRemoteSupport = env .getRemoteScmSupported ();
623
+ boolean remoteSupported = ((globalRemoteSupport == RemoteSCM .ON )
624
+ || (globalRemoteSupport == RemoteSCM .UIONLY )
625
+ || (globalRemoteSupport == RemoteSCM .DIRBASED )
626
+ || !repo .isRemote ());
627
+
628
+ if (!remoteSupported ) {
629
+ LOGGER .log (Level .FINEST , "not eligible to display history for ''{0}'' as repository {1} is remote " +
630
+ "and the global setting is {2}" , new Object []{file , repo , globalRemoteSupport });
631
+ }
632
+
633
+ return remoteSupported ;
634
+ }
635
+
636
+ private static boolean repositoryHasHistory (File file , Repository repo ) {
617
637
if (!repo .isWorking ()) {
618
638
LOGGER .log (Level .FINEST , "repository {0} for ''{1}'' is not working to check history presence" ,
619
639
new Object []{repo , file });
@@ -632,19 +652,7 @@ public boolean hasHistory(File file) {
632
652
return false ;
633
653
}
634
654
635
- // This should return true for Annotate view.
636
- Configuration .RemoteSCM globalRemoteSupport = env .getRemoteScmSupported ();
637
- boolean remoteSupported = ((globalRemoteSupport == RemoteSCM .ON )
638
- || (globalRemoteSupport == RemoteSCM .UIONLY )
639
- || (globalRemoteSupport == RemoteSCM .DIRBASED )
640
- || !repo .isRemote ());
641
-
642
- if (!remoteSupported ) {
643
- LOGGER .log (Level .FINEST , "not eligible to display history for ''{0}'' as repository {1} is remote " +
644
- "and the global setting is {2}" , new Object []{file , repo , globalRemoteSupport });
645
- }
646
-
647
- return remoteSupported ;
655
+ return true ;
648
656
}
649
657
650
658
/**
0 commit comments