Skip to content

Commit 75b3fd5

Browse files
authored
Git - Remove icons from branch picker to address regression (microsoft#153433)
* Remove icons from branch picker to address regression * Fix create branch from issue * Pull request feedback
1 parent a69f95f commit 75b3fd5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

extensions/git/src/commands.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class CheckoutItem implements QuickPickItem {
2828
protected get shortCommit(): string { return (this.ref.commit || '').substr(0, 8); }
2929
get label(): string { return `${this.repository.isBranchProtected(this.ref.name ?? '') ? '$(lock)' : '$(git-branch)'} ${this.ref.name || this.shortCommit}`; }
3030
get description(): string { return this.shortCommit; }
31+
get refName(): string | undefined { return this.ref.name; }
3132

3233
constructor(protected repository: Repository, protected ref: Ref) { }
3334

@@ -140,6 +141,7 @@ class HEADItem implements QuickPickItem {
140141
get label(): string { return 'HEAD'; }
141142
get description(): string { return (this.repository.HEAD && this.repository.HEAD.commit || '').substr(0, 8); }
142143
get alwaysShow(): boolean { return true; }
144+
get refName(): string { return 'HEAD'; }
143145
}
144146

145147
class AddRemoteItem implements QuickPickItem {
@@ -1998,7 +2000,9 @@ export class CommandCenter {
19982000
return;
19992001
}
20002002

2001-
target = choice.label;
2003+
if (choice.refName) {
2004+
target = choice.refName;
2005+
}
20022006
}
20032007

20042008
await repository.branch(branchName, true, target);

0 commit comments

Comments
 (0)