From 736c7606456e8af4effbc999820aaedaada6af12 Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Mon, 1 Apr 2013 19:08:32 +0400 Subject: [PATCH] [git] IDEA-103375 Fix understanding Git submodule roots Git submodule repository is located not in submodule/.git, but in supermodule/modules/.git. At the same time submodule/.git is a file which contains the path to the real repository location. We already detect this, but we didn't use refresh to search for the root as a VirtualFile, and in most cases it was not in the VFS yet. --- plugins/git4idea/src/git4idea/GitUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/git4idea/src/git4idea/GitUtil.java b/plugins/git4idea/src/git4idea/GitUtil.java index a953fe19a4de..734bae8430a6 100644 --- a/plugins/git4idea/src/git4idea/GitUtil.java +++ b/plugins/git4idea/src/git4idea/GitUtil.java @@ -143,7 +143,7 @@ public class GitUtil { } pathToDir = FileUtil.toSystemIndependentName(canonicalPath); } - return VcsUtil.getVirtualFile(pathToDir); + return VcsUtil.getVirtualFileWithRefresh(new File(pathToDir)); } /**