mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-19 08:08:39 +01:00
SCM - add more commands to the repositories view (#274352)
* SCM - artifact tree improvements * Add support for compression * Add more commands
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Event, Disposable, EventEmitter, SourceControlHistoryItemRef, l10n, workspace, Uri, DiagnosticSeverity, env } from 'vscode';
|
||||
import { Event, Disposable, EventEmitter, SourceControlHistoryItemRef, l10n, workspace, Uri, DiagnosticSeverity, env, SourceControlHistoryItem } from 'vscode';
|
||||
import { dirname, normalize, sep, relative } from 'path';
|
||||
import { Readable } from 'stream';
|
||||
import { promises as fs, createReadStream } from 'fs';
|
||||
@@ -797,6 +797,12 @@ export function getCommitShortHash(scope: Uri, hash: string): string {
|
||||
return hash.substring(0, shortHashLength);
|
||||
}
|
||||
|
||||
export function getHistoryItemDisplayName(historyItem: SourceControlHistoryItem): string {
|
||||
return historyItem.references?.length
|
||||
? historyItem.references[0].name
|
||||
: historyItem.displayId ?? historyItem.id;
|
||||
}
|
||||
|
||||
export type DiagnosticSeverityConfig = 'error' | 'warning' | 'information' | 'hint' | 'none';
|
||||
|
||||
export function toDiagnosticSeverity(value: DiagnosticSeverityConfig): DiagnosticSeverity {
|
||||
|
||||
Reference in New Issue
Block a user