mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-283434 git: prefer WSL executable when cloning projects into WSL
GitOrigin-RevId: 4cf2e371960c3651f7623e5ce582b32b88cae079
This commit is contained in:
committed by
intellij-monorepo-bot
parent
203425451e
commit
6ebb6c7631
@@ -183,7 +183,8 @@ public class GitImpl extends GitImplBase {
|
||||
@NotNull final String clonedDirectoryName, final GitLineHandlerListener @NotNull ... listeners) {
|
||||
return runCommand(() -> {
|
||||
// do not use per-project executable for 'clone' command
|
||||
GitLineHandler handler = new GitLineHandler(null, parentDirectory, GitCommand.CLONE);
|
||||
GitExecutable executable = GitExecutableManager.getInstance().getExecutableFor(parentDirectory);
|
||||
GitLineHandler handler = new GitLineHandler(null, parentDirectory, executable, GitCommand.CLONE, emptyList());
|
||||
handler.setSilent(false);
|
||||
handler.setStderrSuppressed(false);
|
||||
handler.setUrl(url);
|
||||
|
||||
@@ -107,6 +107,16 @@ public class GitExecutableManager {
|
||||
return path;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public GitExecutable getExecutableFor(@NotNull File gitDirectory) {
|
||||
String path = GitVcsApplicationSettings.getInstance().getSavedPathToGit();
|
||||
if (path == null) {
|
||||
WSLDistribution wslDistribution = WslPath.getDistributionByWindowsUncPath(gitDirectory.getPath());
|
||||
path = myExecutableDetector.detect(wslDistribution);
|
||||
}
|
||||
return getExecutable(path);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public GitExecutable getExecutable(@Nullable Project project) {
|
||||
String path = getPathToGit(project);
|
||||
|
||||
Reference in New Issue
Block a user