diff --git a/extensions/git/src/api/api1.ts b/extensions/git/src/api/api1.ts index 5d3f3c45386..f049939c137 100644 --- a/extensions/git/src/api/api1.ts +++ b/extensions/git/src/api/api1.ts @@ -192,6 +192,10 @@ export class ApiRepository implements Repository { return this.repository.getRefs(query, cancellationToken); } + checkIgnore(paths: string[]): Promise> { + return this.repository.checkIgnore(paths); + } + getMergeBase(ref1: string, ref2: string): Promise { return this.repository.getMergeBase(ref1, ref2); } diff --git a/extensions/git/src/api/git.d.ts b/extensions/git/src/api/git.d.ts index d6d2166e00b..685b5413947 100644 --- a/extensions/git/src/api/git.d.ts +++ b/extensions/git/src/api/git.d.ts @@ -235,6 +235,8 @@ export interface Repository { getBranchBase(name: string): Promise; setBranchUpstream(name: string, upstream: string): Promise; + checkIgnore(paths: string[]): Promise>; + getRefs(query: RefQuery, cancellationToken?: CancellationToken): Promise; getMergeBase(ref1: string, ref2: string): Promise; diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index 4cfd44bb4f8..ed959765a59 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -3,27 +3,27 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import TelemetryReporter from '@vscode/extension-telemetry'; import * as fs from 'fs'; import * as path from 'path'; import * as picomatch from 'picomatch'; -import { CancellationToken, Command, Disposable, Event, EventEmitter, Memento, ProgressLocation, ProgressOptions, scm, SourceControl, SourceControlInputBox, SourceControlInputBoxValidation, SourceControlInputBoxValidationType, SourceControlResourceDecorations, SourceControlResourceGroup, SourceControlResourceState, ThemeColor, Uri, window, workspace, WorkspaceEdit, FileDecoration, commands, TabInputTextDiff, TabInputNotebookDiff, TabInputTextMultiDiff, RelativePattern, CancellationTokenSource, LogOutputChannel, LogLevel, CancellationError, l10n } from 'vscode'; -import TelemetryReporter from '@vscode/extension-telemetry'; -import { Branch, Change, ForcePushMode, GitErrorCodes, LogOptions, Ref, Remote, Status, CommitOptions, BranchQuery, FetchOptions, RefQuery, RefType } from './api/git'; +import { CancellationError, CancellationToken, CancellationTokenSource, Command, commands, Disposable, Event, EventEmitter, FileDecoration, l10n, LogLevel, LogOutputChannel, Memento, ProgressLocation, ProgressOptions, RelativePattern, scm, SourceControl, SourceControlInputBox, SourceControlInputBoxValidation, SourceControlInputBoxValidationType, SourceControlResourceDecorations, SourceControlResourceGroup, SourceControlResourceState, TabInputNotebookDiff, TabInputTextDiff, TabInputTextMultiDiff, ThemeColor, Uri, window, workspace, WorkspaceEdit } from 'vscode'; +import { ActionButton } from './actionButton'; +import { ApiRepository } from './api/api1'; +import { Branch, BranchQuery, Change, CommitOptions, FetchOptions, ForcePushMode, GitErrorCodes, LogOptions, Ref, RefQuery, RefType, Remote, Status } from './api/git'; import { AutoFetcher } from './autofetch'; +import { GitBranchProtectionProvider, IBranchProtectionProviderRegistry } from './branchProtection'; import { debounce, memoize, throttle } from './decorators'; -import { Commit, GitError, Repository as BaseRepository, Stash, Submodule, LogFileOptions, PullOptions, LsTreeElement } from './git'; +import { Repository as BaseRepository, Commit, GitError, LogFileOptions, LsTreeElement, PullOptions, Stash, Submodule } from './git'; +import { GitHistoryProvider } from './historyProvider'; +import { Operation, OperationKind, OperationManager, OperationResult } from './operation'; +import { CommitCommandsCenter, IPostCommitCommandsProviderRegistry } from './postCommitCommands'; +import { IPushErrorHandlerRegistry } from './pushError'; +import { IRemoteSourcePublisherRegistry } from './remotePublisher'; import { StatusBarCommands } from './statusbar'; import { toGitUri } from './uri'; import { anyEvent, combinedDisposable, debounceEvent, dispose, EmptyDisposable, eventToPromise, filterEvent, find, IDisposable, isDescendant, onceEvent, pathEquals, relativePath } from './util'; import { IFileWatcher, watch } from './watch'; -import { IPushErrorHandlerRegistry } from './pushError'; -import { ApiRepository } from './api/api1'; -import { IRemoteSourcePublisherRegistry } from './remotePublisher'; -import { ActionButton } from './actionButton'; -import { IPostCommitCommandsProviderRegistry, CommitCommandsCenter } from './postCommitCommands'; -import { Operation, OperationKind, OperationManager, OperationResult } from './operation'; -import { GitBranchProtectionProvider, IBranchProtectionProviderRegistry } from './branchProtection'; -import { GitHistoryProvider } from './historyProvider'; const timeout = (millis: number) => new Promise(c => setTimeout(c, millis));