Skip to content

Commit 26ea642

Browse files
committed
reinstate the use of the fetchHistoryWhenNotInCache indexer tunable
fixes #4057
1 parent ab2563d commit 26ea642

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/configuration/Configuration.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,7 @@ public final class Configuration {
207207
/*
208208
* Set to false if we want to disable fetching history of individual files
209209
* (by running appropriate SCM command) when the history is not found
210-
* in history cache for repositories capable of fetching history for
211-
* directories.
210+
* in history cache for repositories capable of fetching history for directories.
212211
*/
213212
private boolean fetchHistoryWhenNotInCache;
214213
/*

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,8 @@ private History getHistoryFromRepository(File file, Repository repository, boole
523523
* fetched in the first phase of indexing.
524524
*/
525525
if (env.isIndexer() && isHistoryIndexDone() &&
526-
repository.isHistoryEnabled() && repository.hasHistoryForDirectories()) {
526+
repository.isHistoryEnabled() && repository.hasHistoryForDirectories() &&
527+
!env.isFetchHistoryWhenNotInCache()) {
527528
LOGGER.log(Level.FINE, "not getting the history for ''{0}'' in repository {1} as the it supports "
528529
+ "history for directories",
529530
new Object[]{file, repository});

0 commit comments

Comments
 (0)