File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ class CheckoutItem implements QuickPickItem {
28
28
protected get shortCommit ( ) : string { return ( this . ref . commit || '' ) . substr ( 0 , 8 ) ; }
29
29
get label ( ) : string { return `${ this . repository . isBranchProtected ( this . ref . name ?? '' ) ? '$(lock)' : '$(git-branch)' } ${ this . ref . name || this . shortCommit } ` ; }
30
30
get description ( ) : string { return this . shortCommit ; }
31
+ get refName ( ) : string | undefined { return this . ref . name ; }
31
32
32
33
constructor ( protected repository : Repository , protected ref : Ref ) { }
33
34
@@ -140,6 +141,7 @@ class HEADItem implements QuickPickItem {
140
141
get label ( ) : string { return 'HEAD' ; }
141
142
get description ( ) : string { return ( this . repository . HEAD && this . repository . HEAD . commit || '' ) . substr ( 0 , 8 ) ; }
142
143
get alwaysShow ( ) : boolean { return true ; }
144
+ get refName ( ) : string { return 'HEAD' ; }
143
145
}
144
146
145
147
class AddRemoteItem implements QuickPickItem {
@@ -1998,7 +2000,9 @@ export class CommandCenter {
1998
2000
return ;
1999
2001
}
2000
2002
2001
- target = choice . label ;
2003
+ if ( choice . refName ) {
2004
+ target = choice . refName ;
2005
+ }
2002
2006
}
2003
2007
2004
2008
await repository . branch ( branchName , true , target ) ;
You can’t perform that action at this time.
0 commit comments