mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
git: use simpler versioning scheme
This commit is contained in:
39
extensions/git/src/api/git.d.ts
vendored
39
extensions/git/src/api/git.d.ts
vendored
@@ -6,24 +6,8 @@
|
||||
import { Uri, SourceControlInputBox, Event, CancellationToken } from 'vscode';
|
||||
import * as cp from 'child_process';
|
||||
|
||||
export interface ExecResult<T extends string | Buffer> {
|
||||
readonly exitCode: number;
|
||||
readonly stdout: T;
|
||||
readonly stderr: string;
|
||||
}
|
||||
|
||||
export interface SpawnOptions extends cp.SpawnOptions {
|
||||
readonly cwd: string;
|
||||
readonly input?: string;
|
||||
readonly encoding?: string;
|
||||
readonly log?: boolean;
|
||||
readonly cancellationToken?: CancellationToken;
|
||||
}
|
||||
|
||||
export interface Git {
|
||||
readonly path: string;
|
||||
exec(args: string[], options: SpawnOptions): Promise<ExecResult<string>>;
|
||||
spawn(args: string[], options: SpawnOptions): cp.ChildProcess;
|
||||
}
|
||||
|
||||
export interface API {
|
||||
@@ -42,30 +26,13 @@ export interface Repository {
|
||||
readonly inputBox: InputBox;
|
||||
}
|
||||
|
||||
declare module GitExtension { }
|
||||
|
||||
export interface GitExtension {
|
||||
|
||||
/**
|
||||
* Returns the latest available API compatible with the
|
||||
* provided version range.
|
||||
* Returns a specific API version.
|
||||
*
|
||||
* @param range Semver version range for API compatibility.
|
||||
* @param version Version number.
|
||||
* @returns API instance
|
||||
*/
|
||||
getAPI(range: string): API;
|
||||
|
||||
/**
|
||||
* Returns the collection of active repositories.
|
||||
*
|
||||
* @deprecated Use `API.repositories` instead.
|
||||
*/
|
||||
getRepositories(): Promise<Repository[]>;
|
||||
|
||||
/**
|
||||
* Returns the path to the current git executable.
|
||||
*
|
||||
* @deprecated Use `API.gitPath` instead.
|
||||
*/
|
||||
getGitPath(): Promise<string>;
|
||||
getAPI(version: 1): API;
|
||||
}
|
||||
Reference in New Issue
Block a user