Skip to content

Commit 8b9e48c

Browse files
committed
check the indexer and add logging
This fixes HistoryControlerTest
1 parent d976954 commit 8b9e48c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,11 @@ private History getHistoryFromRepository(File file, Repository repository, boole
370370
* since the history of all files in this repository should have been
371371
* fetched in the first phase of indexing.
372372
*/
373-
if (isHistoryIndexDone() && repository.isHistoryEnabled() && repository.hasHistoryForDirectories()) {
373+
if (env.isIndexer() && isHistoryIndexDone() &&
374+
repository.isHistoryEnabled() && repository.hasHistoryForDirectories()) {
375+
LOGGER.log(Level.FINE, "not getting the history for ''{0}'' in repository {1} as the it supports "
376+
+ "history for directories",
377+
new Object[]{file, repository});
374378
return null;
375379
}
376380

0 commit comments

Comments
 (0)