mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
Git - Add getRefs() extension API (#170903)
* Add `getRefs()` extension API * Cleanup
This commit is contained in:
18
extensions/git/src/api/git.d.ts
vendored
18
extensions/git/src/api/git.d.ts
vendored
@@ -3,7 +3,7 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Uri, Event, Disposable, ProviderResult, Command } from 'vscode';
|
||||
import { Uri, Event, Disposable, ProviderResult, Command, CancellationToken } from 'vscode';
|
||||
export { ProviderResult } from 'vscode';
|
||||
|
||||
export interface Git {
|
||||
@@ -156,11 +156,15 @@ export interface FetchOptions {
|
||||
depth?: number;
|
||||
}
|
||||
|
||||
export interface BranchQuery {
|
||||
readonly remote?: boolean;
|
||||
readonly pattern?: string;
|
||||
readonly count?: number;
|
||||
export interface RefQuery {
|
||||
readonly contains?: string;
|
||||
readonly count?: number;
|
||||
readonly pattern?: string;
|
||||
readonly sort?: 'alphabetically' | 'committerdate';
|
||||
}
|
||||
|
||||
export interface BranchQuery extends RefQuery {
|
||||
readonly remote?: boolean;
|
||||
}
|
||||
|
||||
export interface Repository {
|
||||
@@ -204,9 +208,11 @@ export interface Repository {
|
||||
createBranch(name: string, checkout: boolean, ref?: string): Promise<void>;
|
||||
deleteBranch(name: string, force?: boolean): Promise<void>;
|
||||
getBranch(name: string): Promise<Branch>;
|
||||
getBranches(query: BranchQuery): Promise<Ref[]>;
|
||||
getBranches(query: BranchQuery, cancellationToken?: CancellationToken): Promise<Ref[]>;
|
||||
setBranchUpstream(name: string, upstream: string): Promise<void>;
|
||||
|
||||
getRefs(query: RefQuery, cancellationToken?: CancellationToken): Promise<Ref[]>;
|
||||
|
||||
getMergeBase(ref1: string, ref2: string): Promise<string>;
|
||||
|
||||
tag(name: string, upstream: string): Promise<void>;
|
||||
|
||||
Reference in New Issue
Block a user