File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
opengrok-indexer/src/main/java/org/opengrok/indexer/history Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 49
49
import org .jetbrains .annotations .Nullable ;
50
50
import org .jetbrains .annotations .VisibleForTesting ;
51
51
import org .opengrok .indexer .configuration .CommandTimeoutType ;
52
+ import org .opengrok .indexer .configuration .Configuration ;
52
53
import org .opengrok .indexer .configuration .Configuration .RemoteSCM ;
53
54
import org .opengrok .indexer .configuration .OpenGrokThreadFactory ;
54
55
import org .opengrok .indexer .configuration .PathAccepter ;
@@ -609,10 +610,18 @@ public boolean hasHistory(File file) {
609
610
}
610
611
611
612
// This should return true for Annotate view.
612
- return ((env .getRemoteScmSupported () == RemoteSCM .ON )
613
- || (env .getRemoteScmSupported () == RemoteSCM .UIONLY )
614
- || (env .getRemoteScmSupported () == RemoteSCM .DIRBASED )
613
+ Configuration .RemoteSCM globalRemoteSupport = env .getRemoteScmSupported ();
614
+ boolean remoteSupported = ((globalRemoteSupport == RemoteSCM .ON )
615
+ || (globalRemoteSupport == RemoteSCM .UIONLY )
616
+ || (globalRemoteSupport == RemoteSCM .DIRBASED )
615
617
|| !repo .isRemote ());
618
+
619
+ if (!remoteSupported ) {
620
+ LOGGER .log (Level .FINEST , "not eligible to display history for ''{0}'' as repository {1} is remote " +
621
+ "and the global setting is {2}" , new Object []{file , repo , globalRemoteSupport });
622
+ }
623
+
624
+ return remoteSupported ;
616
625
}
617
626
618
627
/**
You can’t perform that action at this time.
0 commit comments