public static void readFromRefsFiles(final @NotNull File refsRootDir,
                                       final @NotNull String prefix,
                                       GitRepositoryFiles repositoryFiles,
                                       BiConsumer<String, String> consumer) {
    if (!refsRootDir.exists()) {
      return;
    }
    Ref<Boolean> couldNotLoadFile = Ref.create(false);
    FileUtil.processFilesRecursively(refsRootDir, file -> {
      if (!file.isDirectory() && !isHidden(file)) {
        String relativePath = FileUtil.getRelativePath(refsRootDir, file);
        if (relativePath != null) {
          String branchName = prefix + FileUtil.toSystemIndependentName(relativePath);
          boolean isBranchNameValid = GitRefNameValidator.getInstance().checkInput(branchName);
          if (isBranchNameValid) {
            String hash = loadHashFromBranchFile(file);
            if (hash != null) {
              consumer.accept(branchName, hash);
            }
            else {
              couldNotLoadFile.set(true);
            }
          }
        }
      }
      return true;
    }, dir -> !isHidden(dir));
    if (couldNotLoadFile.get()) {
      logDebugAllRefsFiles(repositoryFiles);
    }
  }
public static void readFromRefsFiles(final @NotNull File refsRootDir,
                                       final @NotNull String prefix,
                                       GitRepositoryFiles repositoryFiles,
                                       BiConsumer<String, String> consumer)