public static @Nullable Hash loadSubmoduleHashAt(@NotNull GitRepository submodule,
                                                   @NotNull GitRepository parentRepo,
                                                   @NotNull VcsRevisionNumber revisionNumber) throws VcsException {
    FilePath filePath = VcsUtil.getFilePath(submodule.getRoot());
    List<StagedFileOrDirectory> lsTree = listTree(parentRepo, Collections.singletonList(filePath), revisionNumber);
    if (lsTree.size() != 1) {
      LOG.warn(String.format("Unexpected output of ls-tree command for submodule [%s] at [%s]: %s", filePath, revisionNumber, lsTree));
      return null;
    }
    StagedSubrepo tree = ObjectUtils.tryCast(lsTree.get(0), GitIndexUtil.StagedSubrepo.class);
    if (tree == null) {
      LOG.warn(String.format("Unexpected type of ls-tree for submodule [%s] at [%s]: %s", filePath, revisionNumber, tree));
      return null;
    }
    if (!filePath.equals(tree.getPath())) {
      LOG.warn(String.format("Submodule path [%s] doesn't match the ls-tree output path [%s]", tree.getPath(), filePath));
      return null;
    }
    return HashImpl.build(tree.getBlobHash());
  }
public static @Nullable Hash loadSubmoduleHashAt(@NotNull GitRepository submodule,
                                                   @NotNull GitRepository parentRepo,
                                                   @NotNull VcsRevisionNumber revisionNumber)