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:
commit
2a00b6b399
1 changed files with 17 additions and 13 deletions
|
|
@ -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" -> {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue