[vcs-log] minor: inline parameter that is never changed

This commit is contained in:
Julia Beliaeva
2016-11-10 20:12:25 +03:00
parent 32e141ef1b
commit 8a6c07f91e
@@ -132,7 +132,7 @@ public class VcsLogPersistentIndex implements VcsLogIndex, Disposable {
mySingleTaskController.request(new IndexingRequest(commitsToIndex, full));
}
private void storeDetails(@NotNull List<? extends VcsFullCommitDetails> details, boolean flush) {
private void storeDetails(@NotNull List<? extends VcsFullCommitDetails> details) {
if (myIndexStorage == null) return;
try {
for (VcsFullCommitDetails detail : details) {
@@ -145,9 +145,6 @@ public class VcsLogPersistentIndex implements VcsLogIndex, Disposable {
myIndexStorage.commits.put(index);
}
if (flush) {
flush();
}
}
catch (IOException e) {
myFatalErrorsConsumer.consume(this, e);
@@ -518,8 +515,7 @@ public class VcsLogPersistentIndex implements VcsLogIndex, Disposable {
private boolean indexOneByOne(@NotNull VirtualFile root, @NotNull TIntHashSet commits) {
VcsLogProvider provider = myProviders.get(root);
try {
storeDetails(provider.readFullDetails(root, TroveUtil.map(commits, value -> myHashMap.getCommitId(value).getHash().asString())),
false);
storeDetails(provider.readFullDetails(root, TroveUtil.map(commits, value -> myHashMap.getCommitId(value).getHash().asString())));
}
catch (VcsException e) {
LOG.error(e);
@@ -554,7 +550,7 @@ public class VcsLogPersistentIndex implements VcsLogIndex, Disposable {
myProviders.get(root).readAllFullDetails(root, details -> {
int index = myHashMap.getCommitIndex(details.getId(), details.getRoot());
if (notIndexed.contains(index)) {
storeDetails(Collections.singletonList(details), false);
storeDetails(Collections.singletonList(details));
counter.newIndexedCommits++;
}