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:
Ladislau Szomoru
2025-10-31 14:44:15 +00:00
committed by GitHub
parent 4b1a7b8b8c
commit e82ab3b366
5 changed files with 251 additions and 87 deletions

View File

@@ -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 {