@@ -20,7 +20,7 @@ class CheckoutStatusBar {
2020 private disposables : Disposable [ ] = [ ] ;
2121
2222 constructor ( private repository : Repository ) {
23- repository . onDidChange ( this . _onDidChange . fire , this . _onDidChange , this . disposables ) ;
23+ repository . onDidChangeStatus ( this . _onDidChange . fire , this . _onDidChange , this . disposables ) ;
2424 }
2525
2626 get command ( ) : Command | undefined {
@@ -42,7 +42,8 @@ class CheckoutStatusBar {
4242 return {
4343 command : 'git.checkout' ,
4444 tooltip : localize ( 'checkout' , 'Checkout...' ) ,
45- title
45+ title,
46+ arguments : [ this . repository . sourceControl ]
4647 } ;
4748 }
4849
@@ -77,7 +78,7 @@ class SyncStatusBar {
7778 }
7879
7980 constructor ( private repository : Repository ) {
80- repository . onDidChange ( this . onModelChange , this , this . disposables ) ;
81+ repository . onDidChangeStatus ( this . onModelChange , this , this . disposables ) ;
8182 repository . onDidChangeOperations ( this . onOperationsChange , this , this . disposables ) ;
8283 this . _onDidChange . fire ( ) ;
8384 }
@@ -98,6 +99,7 @@ class SyncStatusBar {
9899 }
99100
100101 get command ( ) : Command | undefined {
102+ console . log ( this . repository . remotes , this . state . hasRemotes ) ;
101103 if ( ! this . state . hasRemotes ) {
102104 return undefined ;
103105 }
@@ -134,7 +136,8 @@ class SyncStatusBar {
134136 return {
135137 command,
136138 title : [ icon , text ] . join ( ' ' ) . trim ( ) ,
137- tooltip
139+ tooltip,
140+ arguments : [ this . repository . sourceControl ]
138141 } ;
139142 }
140143
@@ -171,6 +174,7 @@ export class StatusBarCommands {
171174 }
172175
173176 const sync = this . syncStatusBar . command ;
177+ console . log ( sync ) ;
174178
175179 if ( sync ) {
176180 result . push ( sync ) ;
0 commit comments