Ensure nested git repositories are picked up
commitac9321680de575e3e98f5e232bd0f5a02b20ec5b
authorThomas Wolf <thomas.wolf@paranor.ch>
Tue, 16 Mar 2021 20:58:25 +0000 (16 21:58 +0100)
committerThomas Wolf <thomas.wolf@paranor.ch>
Wed, 17 Mar 2021 08:10:16 +0000 (17 09:10 +0100)
tree2193b60e2240e5fe822c5a20c0480757e582c2b5
parent3fa33fe2f0097b592dbf8a4e105f4f49bb2d2f92
Ensure nested git repositories are picked up

EGit already detected .git resources inside newly connected Eclipse
projects and touched them to force a ResourceChangeEvent containing
them in the delta so that GitProjectData could connect the submodules.

However, that didn't always work. First, the corresponding code was
sometimes not called (for instance, when auto-sharing a project), and
second, it didn't work for nested repositories. Touching a folder does
not include it in the next resource delta.

Instead of touching ".git" resources and relying on a resource change
event collect the resources and pass them to GitProjectData directly.

Bug: 571984
Change-Id: I097ee672a70540e8cebb4e8492260fa8ce715c57
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConnectProviderOperation.java
org.eclipse.egit.core/src/org/eclipse/egit/core/project/GitProjectData.java