private static File @NotNull [] getSortedSubReposRoots(@NotNull File dir) {
      Set<File> result = new HashSet<>();
      for (String root : ROOT_NAMES) {
        var subRepo = new File(dir, root);
        if (subRepo.exists() && subRepo.isDirectory()) {
          result.add(subRepo.toPath().normalize().toFile());
        }
      }
      File[] gitRoots = result.toArray(new File[0]);

      Arrays.sort(gitRoots, FileUtil::compareFiles);
      return gitRoots;
    }
private static File @NotNull [] getSortedSubReposRoots(@NotNull File dir)