Skip to content

Commit d6ca516

Browse files
author
Vladimir Kotal
committed
introduce constants for maximum changeset count
1 parent 58be347 commit d6ca516

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ public class GitRepository extends RepositoryWithPerPartesHistory {
135135
private static final LazilyInstantiate<Boolean> GIT_IS_WORKING = LazilyInstantiate.using(GitRepository::isGitWorking);
136136

137137
public static final int GIT_ABBREV_LEN = 8;
138+
public static final int MAX_CHANGESETS = 512;
138139

139140
public GitRepository() {
140141
type = "git";
@@ -529,7 +530,7 @@ History getHistory(File file, String sinceRevision) throws HistoryException {
529530
}
530531

531532
public int getPerPartesCount() {
532-
return 512;
533+
return MAX_CHANGESETS;
533534
}
534535

535536
public void accept(String sinceRevision, IChangesetVisitor visitor) throws HistoryException {

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
*/
3131
public abstract class RepositoryWithPerPartesHistory extends Repository {
3232
private static final long serialVersionUID = -3433255821312805064L;
33+
public static final int MAX_CHANGESETS = 128;
3334

3435
/**
3536
* Just like for {@link Repository#getHistory(File)} it is expected that the lists of (renamed) files
@@ -46,7 +47,7 @@ public abstract class RepositoryWithPerPartesHistory extends Repository {
4647
* @return maximum number of entries to retrieve
4748
*/
4849
public int getPerPartesCount() {
49-
return 128;
50+
return MAX_CHANGESETS;
5051
}
5152

5253
/**

0 commit comments

Comments
 (0)