Search in sources :

Example 1 with GitExecutableValidator

use of git4idea.config.GitExecutableValidator in project intellij-community by JetBrains.

the class GitHistoryProvider method reportAppendableHistory.

@Override
public void reportAppendableHistory(@NotNull FilePath path, @Nullable VcsRevisionNumber startingRevision, @NotNull final VcsAppendableHistorySessionPartner partner) throws VcsException {
    final VcsAbstractHistorySession emptySession = createSession(path, Collections.emptyList(), null);
    partner.reportCreatedEmptySession(emptySession);
    VcsConfiguration vcsConfiguration = VcsConfiguration.getInstance(myProject);
    String[] additionalArgs = vcsConfiguration.LIMIT_HISTORY ? new String[] { "--max-count=" + vcsConfiguration.MAXIMUM_HISTORY_ROWS } : ArrayUtil.EMPTY_STRING_ARRAY;
    final GitExecutableValidator validator = GitVcs.getInstance(myProject).getExecutableValidator();
    GitHistoryUtils.history(myProject, refreshPath(path), null, startingRevision == null ? GitRevisionNumber.HEAD : startingRevision, fileRevision -> partner.acceptRevision(fileRevision), exception -> {
        if (validator.checkExecutableAndNotifyIfNeeded()) {
            partner.reportException(exception);
        }
    }, additionalArgs);
}
Also used : GitExecutableValidator(git4idea.config.GitExecutableValidator) VcsConfiguration(com.intellij.openapi.vcs.VcsConfiguration)

Aggregations

VcsConfiguration (com.intellij.openapi.vcs.VcsConfiguration)1 GitExecutableValidator (git4idea.config.GitExecutableValidator)1