Skip to content

Commit ccefc97

Browse files
committed
honor history cache setting
1 parent ec58367 commit ccefc97

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/history/HistoryGuru.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1048,9 +1048,18 @@ public void storeHistory(File file, History history) {
10481048
}
10491049

10501050
private void createHistoryCache(Repository repository, String sinceRevision) throws CacheException, HistoryException {
1051+
// TODO: add test for this
1052+
if (!repository.isHistoryCacheEnabled()) {
1053+
LOGGER.log(Level.INFO,
1054+
"Skipping history cache creation for {0} and its subdirectories: history cache disabled",
1055+
repository);
1056+
return;
1057+
}
1058+
10511059
if (!repository.isHistoryEnabled()) {
10521060
LOGGER.log(Level.INFO,
1053-
"Skipping history cache creation for {0} and its subdirectories", repository);
1061+
"Skipping history cache creation for {0} and its subdirectories: history disabled",
1062+
repository);
10541063
return;
10551064
}
10561065

0 commit comments

Comments
 (0)