Add git extension API for branches (#97621)

Enables microsoft/vscode-pull-request-github#1781
This commit is contained in:
Alex Ross
2020-05-14 12:26:50 +02:00
committed by GitHub
parent e045073284
commit 6570efce0f
4 changed files with 28 additions and 4 deletions

View File

@@ -132,6 +132,11 @@ export interface CommitOptions {
empty?: boolean;
}
export interface BranchQuery {
readonly remote?: boolean;
readonly contains?: string;
}
export interface Repository {
readonly rootUri: Uri;
@@ -171,6 +176,7 @@ 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[]>;
setBranchUpstream(name: string, upstream: string): Promise<void>;
getMergeBase(ref1: string, ref2: string): Promise<string>;