mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[git] IDEA-81563 Correctly identify Git root for submodule changes
When the submodule is changed in the super-project, the root of this change is this super-project, not the submodule root. In particular, this led to exception when trying to merge conflicts when one of conflicts was the submodule.
This commit is contained in:
@@ -180,7 +180,8 @@ public class GitUtil {
|
||||
throws VcsException {
|
||||
Map<VirtualFile, List<VirtualFile>> result = new HashMap<VirtualFile, List<VirtualFile>>();
|
||||
for (VirtualFile file : virtualFiles) {
|
||||
final VirtualFile vcsRoot = gitRootOrNull(file);
|
||||
// directory is reported only when it is a submodule => it should be treated in the context of super-root
|
||||
final VirtualFile vcsRoot = gitRootOrNull(file.isDirectory() ? file.getParent() : file);
|
||||
if (vcsRoot == null) {
|
||||
if (ignoreNonGit) {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user