@ApiStatus.Internal
  public @NotNull List<GitFileStatus> refresh(@NotNull RootDirtySet dirtyPaths) throws VcsException {
    VirtualFile root = myRepository.getRoot();

    StructuredIdeActivity activity = GitRefreshUsageCollector.logStatusRefresh(myProject, dirtyPaths.isEverythingDirty());
    List<GitFileStatus> rootRecords = GitIndexStatusUtilKt.getStatus(myProject, root, dirtyPaths.collectFilePaths(), true, false, false);
    activity.finished();

    removeUnwantedRecords(rootRecords, dirtyPaths);

    synchronized (LOCK) {
      myRecords.removeIf(record -> isUnder(record, dirtyPaths));
      myRecords.addAll(rootRecords);
    }

    BackgroundTaskUtil.syncPublisher(myProject, TOPIC).stagingAreaChanged(myRepository);

    return rootRecords;
  }
@ApiStatus.Internal
  public @NotNull List<GitFileStatus> refresh(@NotNull RootDirtySet dirtyPaths)