mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 01:58:53 +01:00
feat: add push to git extension API
This commit is contained in:
@@ -150,6 +150,14 @@ export class ApiRepository implements Repository {
|
||||
pull(): Promise<void> {
|
||||
return this._repository.pull();
|
||||
}
|
||||
|
||||
push(head: Branch): Promise<void> {
|
||||
return this._repository.push(head);
|
||||
}
|
||||
|
||||
pushTo(remote?: string, name?: string, setUpstream: boolean = false): Promise<void> {
|
||||
return this._repository.pushTo(remote, name, setUpstream);
|
||||
}
|
||||
}
|
||||
|
||||
export class ApiGit implements Git {
|
||||
|
||||
2
extensions/git/src/api/git.d.ts
vendored
2
extensions/git/src/api/git.d.ts
vendored
@@ -118,6 +118,8 @@ export interface Repository {
|
||||
|
||||
fetch(remote?: string, ref?: string): Promise<void>;
|
||||
pull(): Promise<void>;
|
||||
push(head: Branch): Promise<void>;
|
||||
pushTo(remote?: string, name?: string, setUpstream?: boolean): Promise<void>;
|
||||
}
|
||||
|
||||
export interface API {
|
||||
|
||||
Reference in New Issue
Block a user