[warmup] Move git log indexing command to git module

GitOrigin-RevId: 62c33889255b133da1824a462daced8797e5700f
This commit is contained in:
Konstantin Nisht
2024-03-26 17:58:20 +00:00
committed by intellij-monorepo-bot
parent cca4330918
commit 1ac0355767
4 changed files with 8 additions and 3 deletions
@@ -7,6 +7,5 @@ import com.jetbrains.performancePlugin.CreateCommand
class WarmupCommandProvider : CommandProvider {
override fun getCommands() : Map<String, CreateCommand> = mapOf(
Pair(BUILD_PREFIX, CreateCommand(::CheckWarmupBuildStatusCommand)),
Pair(GIT_LOG_PREFIX, CreateCommand(::CheckGitLogIndexedCommand)),
)
}
@@ -1,5 +1,5 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.warmup
package git4idea.performanceTesting
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.components.serviceIfCreated
@@ -17,6 +17,11 @@ import org.jetbrains.concurrency.toPromise
* Checks that VCS log is fully indexed on project closing
*/
class CheckGitLogIndexedCommand(text: String, line: Int) : AbstractCommand(text, line) {
companion object {
const val PREFIX = CMD_PREFIX + "checkGitLogIndexing"
}
override fun _execute(context: PlaybackContext): Promise<in Any> {
val callback = assertVcsLogIndexed()
@@ -16,7 +16,8 @@ public final class GitCommandProvider implements CommandProvider {
Map.entry(GitCommitCommand.PREFIX, GitCommitCommand::new),
Map.entry(FilterVcsLogTabCommand.PREFIX, FilterVcsLogTabCommand::new),
Map.entry(GitShowVcsWidgetCommand.PREFIX, GitShowVcsWidgetCommand::new),
Map.entry(ShowFileAnnotationCommand.PREFIX, ShowFileAnnotationCommand::new)
Map.entry(ShowFileAnnotationCommand.PREFIX, ShowFileAnnotationCommand::new),
Map.entry(CheckGitLogIndexedCommand.PREFIX, CheckGitLogIndexedCommand::new)
);
}
}