File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -82,14 +82,19 @@ export class CommitCommandsCenter {
82
82
private readonly postCommitCommandsProviderRegistry : IPostCommitCommandsProviderRegistry
83
83
) {
84
84
const root = Uri . file ( repository . root ) ;
85
- this . disposables . push ( workspace . onDidChangeConfiguration ( async e => {
85
+
86
+ const onRememberPostCommitCommandChange = async ( ) => {
87
+ const config = workspace . getConfiguration ( 'git' , root ) ;
88
+ if ( ! config . get < boolean > ( 'rememberPostCommitCommand' ) ) {
89
+ await this . globalState . update ( repository . root , undefined ) ;
90
+ }
91
+ } ;
92
+ this . disposables . push ( workspace . onDidChangeConfiguration ( e => {
86
93
if ( e . affectsConfiguration ( 'git.rememberPostCommitCommand' , root ) ) {
87
- const config = workspace . getConfiguration ( 'git' , root ) ;
88
- if ( ! config . get < boolean > ( 'rememberPostCommitCommand' ) ) {
89
- await this . globalState . update ( repository . root , undefined ) ;
90
- }
94
+ onRememberPostCommitCommandChange ( ) ;
91
95
}
92
96
} ) ) ;
97
+ onRememberPostCommitCommandChange ( ) ;
93
98
94
99
this . disposables . push ( postCommitCommandsProviderRegistry . onDidChangePostCommitCommandsProviders ( ( ) => this . _onDidChange . fire ( ) ) ) ;
95
100
}
You can’t perform that action at this time.
0 commit comments