mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[vcs-log] fix working with escaped or quoted spaces when splitting a command line into a list of parameters
GitOrigin-RevId: 43de4d4f4ef309e73d738b385ca2a66ea48e546d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
0badf4c448
commit
f1b59e811d
@@ -3,6 +3,7 @@ package git4idea.log.command
|
||||
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.vfs.VirtualFile
|
||||
import com.intellij.util.execution.ParametersListUtil
|
||||
import com.intellij.vcs.log.VcsLogFilterCollection
|
||||
import com.intellij.vcs.log.data.DataPack
|
||||
import com.intellij.vcs.log.data.VcsLogStorage
|
||||
@@ -54,7 +55,7 @@ class GitLogCommandFilterer(private val project: Project,
|
||||
}
|
||||
|
||||
private fun prepareCommand(commandFilter: GitLogCommandFilter, commitCount: CommitCountStage): List<String> {
|
||||
val command = commandFilter.command.split(" ").toMutableList()
|
||||
val command = ParametersListUtil.parse(commandFilter.command, false, true).toMutableList()
|
||||
command.removeIf { it.startsWith("--pretty") }
|
||||
if (!commitCount.isAll() && !commandFilter.hasMaxCount()) {
|
||||
command.add(0, "$MAX_COUNT${commitCount.count}")
|
||||
|
||||
Reference in New Issue
Block a user