mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[vcs-log] inline indexOneByOne method
This commit is contained in:
+3
-10
@@ -587,9 +587,9 @@ public class VcsLogPersistentIndex implements VcsLogIndex, Disposable {
|
||||
TroveUtil.processBatches(commits, BATCH_SIZE, batch -> {
|
||||
counter.indicator.checkCanceled();
|
||||
|
||||
if (indexOneByOne(batch)) {
|
||||
counter.newIndexedCommits += batch.size();
|
||||
}
|
||||
List<String> hashes = TroveUtil.map(batch, value -> myStorage.getCommitId(value).getHash().asString());
|
||||
myProviders.get(myRoot).readFullDetails(myRoot, hashes, VcsLogPersistentIndex.this::storeDetail, true);
|
||||
counter.newIndexedCommits += batch.size();
|
||||
|
||||
counter.displayProgress();
|
||||
});
|
||||
@@ -597,13 +597,6 @@ public class VcsLogPersistentIndex implements VcsLogIndex, Disposable {
|
||||
flush();
|
||||
}
|
||||
|
||||
private boolean indexOneByOne(@NotNull TIntHashSet commits) throws VcsException {
|
||||
VcsLogProvider provider = myProviders.get(myRoot);
|
||||
List<String> hashes = TroveUtil.map(commits, value -> myStorage.getCommitId(value).getHash().asString());
|
||||
provider.readFullDetails(myRoot, hashes, VcsLogPersistentIndex.this::storeDetail, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
public void indexAll(@NotNull TIntHashSet commits, @NotNull CommitsCounter counter) throws VcsException {
|
||||
counter.displayProgress();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user