Merge pull request #2693 from dschling/dev

Fixes #2692 - add support for multiple modules in jetbrains for git diff context provider
This commit is contained in:
Nate Sesti 2024-10-26 23:40:29 -07:00 • committed by GitHub
commit 2a00b6b399
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -451,22 +451,26 @@ class IdeProtocolClient(
}
"getDiff" -> {
val builder = ProcessBuilder("git", "diff")
builder.directory(File(workspacePath ?: "."))
val process = builder.start()
val reader = BufferedReader(InputStreamReader(process.inputStream))
val workspaceDirs = workspaceDirectories()
val output = StringBuilder()
var line: String? = reader.readLine()
while (line != null) {
output.append(line)
output.append("\n")
line = reader.readLine()
for (workspaceDir in workspaceDirs) {
val builder = ProcessBuilder("git", "diff")
builder.directory(File(workspaceDir))
val process = builder.start()
val reader = BufferedReader(InputStreamReader(process.inputStream))
var line: String? = reader.readLine()
while (line != null) {
output.append(line)
output.append("\n")
line = reader.readLine()
}
process.waitFor()
}
process.waitFor()
respond(output.toString());
respond(output.toString())
}
"getProblems" -> {