IDEA-172253 git: support WSL git executable for project in WSL file system

GitOrigin-RevId: b35a187effb08ceeb9521c0f71de499216e55d67
This commit is contained in:
Aleksey Pivovarov
2020-05-17 12:59:58 +00:00
committed by intellij-monorepo-bot
parent c41b29aba3
commit 28f7f30cf4
2 changed files with 4 additions and 3 deletions
@@ -424,7 +424,7 @@ public class WSLDistribution {
*/
@ApiStatus.Experimental
@NotNull
File getUNCRoot() {
public File getUNCRoot() {
return new File(UNC_PREFIX + myDescriptor.getMsId());
}
@@ -66,8 +66,9 @@ sealed class GitExecutable {
}
override fun convertFilePathBack(path: String, workingDir: File): File {
val localPath = distribution.getWindowsPath(path) ?: path
return File(localPath)
val localPath = distribution.getWindowsPath(path)
if (localPath != null) return File(localPath)
return File(distribution.uncRoot, path)
}
override fun patchCommandLine(handler: GitHandler, commandLine: GeneralCommandLine, withLowPriority: Boolean, withNoTty: Boolean) {