mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 01:58:53 +01:00
cleanup git delete tag command
This commit is contained in:
@@ -15,7 +15,7 @@ import { assign, groupBy, denodeify, IDisposable, toDisposable, dispose, mkdirp,
|
||||
import { CancellationToken, Progress } from 'vscode';
|
||||
import { URI } from 'vscode-uri';
|
||||
import { detectEncoding } from './encoding';
|
||||
import { Ref, RefType, Branch, Remote, GitErrorCodes, LogOptions, Change, Status, Tag } from './api/git';
|
||||
import { Ref, RefType, Branch, Remote, GitErrorCodes, LogOptions, Change, Status } from './api/git';
|
||||
import * as byline from 'byline';
|
||||
import { StringDecoder } from 'string_decoder';
|
||||
|
||||
@@ -1332,21 +1332,6 @@ export class Repository {
|
||||
await this.run(args);
|
||||
}
|
||||
|
||||
async getTags(): Promise<Tag[]> {
|
||||
let args = ['tag', '-n1'];
|
||||
const result = await this.run(args);
|
||||
return result.stdout.trim().split('\n')
|
||||
.map(line => line.trim().split('\0'))
|
||||
.map(([line]) => {
|
||||
const name = line.split(' ')[0];
|
||||
return {
|
||||
name: name,
|
||||
message: line.replace(name, '').trim() || '',
|
||||
type: RefType.Tag
|
||||
} as Tag;
|
||||
});
|
||||
}
|
||||
|
||||
async clean(paths: string[]): Promise<void> {
|
||||
const pathsByGroup = groupBy(paths, p => path.dirname(p));
|
||||
const groups = Object.keys(pathsByGroup).map(k => pathsByGroup[k]);
|
||||
|
||||
Reference in New Issue
Block a user