File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,19 @@ export class SimpleGit extends GitManager {
88
88
process . env [ key ] = value ;
89
89
}
90
90
91
- debug . enable ( "simple-git" ) ;
91
+ const SIMPLE_GIT_NAMESPACE = "simple-git" ;
92
+ const NAMESPACE_SEPARATOR = "," ;
93
+ const currentDebug = ( localStorage . debug ?? "" ) as string ;
94
+ const namespaces = currentDebug . split ( NAMESPACE_SEPARATOR ) ;
95
+
96
+ if (
97
+ ! namespaces . includes ( SIMPLE_GIT_NAMESPACE ) &&
98
+ ! namespaces . includes ( `-${ SIMPLE_GIT_NAMESPACE } ` )
99
+ ) {
100
+ namespaces . push ( SIMPLE_GIT_NAMESPACE ) ;
101
+ debug . enable ( namespaces . join ( NAMESPACE_SEPARATOR ) ) ;
102
+ }
103
+
92
104
if ( await this . git . checkIsRepo ( ) ) {
93
105
// Resolve the relative root reported by git into an absolute path
94
106
// in case git resides in a different filesystem (eg, WSL)
You can’t perform that action at this time.
0 commit comments