From 297d74c7fc40c80225c95991e959df0b87197a94 Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Mon, 22 Oct 2018 12:48:20 +0300 Subject: [PATCH] git: fetch submodules during Update Project (IDEA-200864) `git submodule update` doesn't fetch submodules. `git fetch` in the parent repository fetches submodules "on-demand", i.e. only if the parent repository references to unknown commit in the submodule. It is safe to pass all repositories to the fetch support: the ones without a valid remote will be ignored. --- plugins/git4idea/src/git4idea/update/GitUpdateProcess.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/git4idea/src/git4idea/update/GitUpdateProcess.java b/plugins/git4idea/src/git4idea/update/GitUpdateProcess.java index f078f61ab778..a4a3383685d9 100644 --- a/plugins/git4idea/src/git4idea/update/GitUpdateProcess.java +++ b/plugins/git4idea/src/git4idea/update/GitUpdateProcess.java @@ -132,7 +132,7 @@ public class GitUpdateProcess { return GitUpdateResult.NOT_READY; } - if (!fetchAndNotify(trackedBranches.keySet())) { + if (!fetchAndNotify(myRepositories)) { return GitUpdateResult.NOT_READY; }