@Override
  protected void save(@NotNull Collection<? extends VirtualFile> rootsToSave) throws VcsException {
    LOG.info("saving " + rootsToSave);

    ActivityId activityId = myReportLocalHistoryActivity ? GitActivity.Stash : null;
    try (AccessToken ignore = DvcsUtil.workingTreeChangeStarted(myProject, GitBundle.message("activity.name.stash"), activityId)) {
      for (VirtualFile root : rootsToSave) {
        String message = GitBundle.message("stash.progress.indicator.title", root.getName());
        LOG.info(message);
        final String oldProgressTitle = myProgressIndicator.getText();
        myProgressIndicator.setText(message);
        GitRepository repository = myRepositoryManager.getRepositoryForRoot(root);
        if (repository == null) {
          LOG.error("Repository is null for root " + root);
        }
        else {
          StructuredIdeActivity activity = GitStashUsageCollector.logStashPush(myProject);
          GitCommandResult result = myGit.stashSave(repository, myStashMessage);
          activity.finished();

          if (result.success() && somethingWasStashed(result)) {
            myStashedRoots.put(root, myGit.resolveReference(repository, "stash@{0}"));
          }
          else {
            if (!result.success()) {
              throw new VcsException(GitBundle.message("exception.message.could.not.stash.root.error",
                                                       repository.getRoot(), result.getErrorOutputAsJoinedString()));
            }
            else {
              LOG.warn("There was nothing to stash in " + repository.getRoot());
            }
          }
        }
        myProgressIndicator.setText(oldProgressTitle);
      }
    }
  }
@Override
  protected void save(@NotNull Collection<? extends VirtualFile> rootsToSave)