mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 10:38:59 +01:00
git: sync action
This commit is contained in:
@@ -91,6 +91,7 @@ class CommandCenter {
|
||||
commands.registerCommand('git.clean', this.clean, this),
|
||||
commands.registerCommand('git.cleanAll', this.cleanAll, this),
|
||||
commands.registerCommand('git.checkout', this.checkout, this),
|
||||
commands.registerCommand('git.sync', this.sync, this),
|
||||
commands.registerCommand('git.publish', this.publish, this),
|
||||
);
|
||||
}
|
||||
@@ -204,6 +205,11 @@ class CommandCenter {
|
||||
await choice.run(this.model);
|
||||
}
|
||||
|
||||
@decorate(catchErrors)
|
||||
async sync(): Promise<void> {
|
||||
await this.model.sync();
|
||||
}
|
||||
|
||||
@decorate(catchErrors)
|
||||
async publish(): Promise<void> {
|
||||
const branchName = this.model.HEAD && this.model.HEAD.name || '';
|
||||
|
||||
@@ -327,6 +327,11 @@ export class Model {
|
||||
await this.update();
|
||||
}
|
||||
|
||||
async sync(): Promise<void> {
|
||||
await this.repository.sync();
|
||||
await this.update();
|
||||
}
|
||||
|
||||
async push(remote?: string, name?: string, options?: IPushOptions): Promise<void> {
|
||||
await this.repository.push(remote, name, options);
|
||||
await this.update();
|
||||
|
||||
Reference in New Issue
Block a user