Added quickpick option and display of tag annotation on menu

This commit is contained in:
Xhulio Hasani
2019-08-20 16:05:46 -04:00
parent 98ed0fc2e8
commit 32d59ba806
6 changed files with 70 additions and 13 deletions

View File

@@ -13,7 +13,7 @@ import * as path from 'path';
import * as nls from 'vscode-nls';
import * as fs from 'fs';
import { StatusBarCommands } from './statusbar';
import { Branch, Ref, Remote, RefType, GitErrorCodes, Status, LogOptions, Change } from './api/git';
import { Branch, Ref, Remote, RefType, GitErrorCodes, Status, LogOptions, Change, Tag } from './api/git';
import { IFileWatcher, watch } from './watch';
const timeout = (millis: number) => new Promise(c => setTimeout(c, millis));
@@ -296,6 +296,7 @@ export const enum Operation {
Ignore = 'Ignore',
Tag = 'Tag',
DeleteTag = 'DeleteTag',
GetTags = 'GetTags',
Stash = 'Stash',
CheckIgnore = 'CheckIgnore',
GetObjectDetails = 'GetObjectDetails',
@@ -1006,6 +1007,10 @@ export class Repository implements Disposable {
await this.run(Operation.DeleteTag, () => this.repository.deleteTag(name));
}
async getTags(): Promise<Tag[]> {
return await this.run(Operation.GetTags, () => this.repository.getTags());
}
async checkout(treeish: string): Promise<void> {
await this.run(Operation.Checkout, () => this.repository.checkout(treeish, []));
}