mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
@@ -26,7 +26,7 @@ const localize = nls.loadMessageBundle();
|
|||||||
class CheckoutItem implements QuickPickItem {
|
class CheckoutItem implements QuickPickItem {
|
||||||
|
|
||||||
protected get shortCommit(): string { return (this.ref.commit || '').substr(0, 8); }
|
protected get shortCommit(): string { return (this.ref.commit || '').substr(0, 8); }
|
||||||
get label(): string { return this.ref.name ? `${this.ref.name}${this.repository.isBranchProtected(this.ref.name) ? ' $(lock-small)' : ''}` : this.shortCommit; }
|
get label(): string { return `${this.repository.isBranchProtected(this.ref.name ?? '') ? '$(lock)' : '$(git-branch)'} ${this.ref.name || this.shortCommit}`; }
|
||||||
get description(): string { return this.shortCommit; }
|
get description(): string { return this.shortCommit; }
|
||||||
|
|
||||||
constructor(protected repository: Repository, protected ref: Ref) { }
|
constructor(protected repository: Repository, protected ref: Ref) { }
|
||||||
@@ -44,7 +44,7 @@ class CheckoutItem implements QuickPickItem {
|
|||||||
|
|
||||||
class CheckoutTagItem extends CheckoutItem {
|
class CheckoutTagItem extends CheckoutItem {
|
||||||
|
|
||||||
override get label(): string { return this.ref.name || this.shortCommit; }
|
override get label(): string { return `$(tag) ${this.ref.name || this.shortCommit}`; }
|
||||||
override get description(): string {
|
override get description(): string {
|
||||||
return localize('tag at', "Tag at {0}", this.shortCommit);
|
return localize('tag at', "Tag at {0}", this.shortCommit);
|
||||||
}
|
}
|
||||||
@@ -52,7 +52,7 @@ class CheckoutTagItem extends CheckoutItem {
|
|||||||
|
|
||||||
class CheckoutRemoteHeadItem extends CheckoutItem {
|
class CheckoutRemoteHeadItem extends CheckoutItem {
|
||||||
|
|
||||||
override get label(): string { return this.ref.name || this.shortCommit; }
|
override get label(): string { return `$(git-branch) ${this.ref.name || this.shortCommit}`; }
|
||||||
override get description(): string {
|
override get description(): string {
|
||||||
return localize('remote branch at', "Remote branch at {0}", this.shortCommit);
|
return localize('remote branch at', "Remote branch at {0}", this.shortCommit);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user