File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ const rb = '%3e'; // `%${'>'.charCodeAt(0).toString(16)}`;
1111export class GitBranchParser {
1212 static defaultFormat = [
1313 `${ lb } h${ rb } %(HEAD)` , // HEAD indicator
14- `${ lb } n${ rb } %(refname:lstrip=1 )` , // branch name
14+ `${ lb } n${ rb } %(refname)` , // branch name
1515 `${ lb } u${ rb } %(upstream:short)` , // branch upstream
1616 `${ lb } t${ rb } %(upstream:track)` , // branch upstream tracking state
1717 `${ lb } r${ rb } %(objectname)` // ref
@@ -54,14 +54,14 @@ export class GitBranchParser {
5454 behind = 0 ;
5555 }
5656
57- if ( name . startsWith ( 'remotes/' ) ) {
58- // Strip off remotes/
59- name = name . substr ( 8 ) ;
57+ if ( name . startsWith ( 'refs/ remotes/' ) ) {
58+ // Strip off refs/ remotes/
59+ name = name . substr ( 13 ) ;
6060 remote = true ;
6161 }
6262 else {
63- // Strip off heads/
64- name = name . substr ( 6 ) ;
63+ // Strip off refs/ heads/
64+ name = name . substr ( 11 ) ;
6565 remote = false ;
6666 }
6767
You can’t perform that action at this time.
0 commit comments