@@ -5,7 +5,7 @@ jest.mock('fs');
55
66import * as fs from 'fs' ;
77import { ExtensionState } from '../src/extensionState' ;
8- import { FileViewType , GitGraphViewGlobalState , IncludeCommitsMentionedByReflogs , OnlyFollowFirstParent , RepoCommitOrdering , ShowCheckedOutBranch , ShowRemoteBranches , ShowTags } from '../src/types' ;
8+ import { BooleanOverride , FileViewType , GitGraphViewGlobalState , RepoCommitOrdering } from '../src/types' ;
99import { GitExecutable } from '../src/utils' ;
1010import { EventEmitter } from '../src/utils/event' ;
1111
@@ -63,16 +63,16 @@ describe('ExtensionState', () => {
6363 commitOrdering : RepoCommitOrdering . AuthorDate ,
6464 fileViewType : FileViewType . List ,
6565 hideRemotes : [ ] ,
66- includeCommitsMentionedByReflogs : IncludeCommitsMentionedByReflogs . Enabled ,
66+ includeCommitsMentionedByReflogs : BooleanOverride . Enabled ,
6767 issueLinkingConfig : null ,
6868 name : 'Custom Name' ,
69- onlyFollowFirstParent : OnlyFollowFirstParent . Disabled ,
70- onRepoLoadShowCheckedOutBranch : ShowCheckedOutBranch . Enabled ,
69+ onlyFollowFirstParent : BooleanOverride . Disabled ,
70+ onRepoLoadShowCheckedOutBranch : BooleanOverride . Enabled ,
7171 onRepoLoadShowSpecificBranches : [ 'master' ] ,
7272 pullRequestConfig : null ,
7373 showRemoteBranches : true ,
74- showRemoteBranchesV2 : ShowRemoteBranches . Show ,
75- showTags : ShowTags . Show
74+ showRemoteBranchesV2 : BooleanOverride . Enabled ,
75+ showTags : BooleanOverride . Enabled
7676 } ;
7777 extensionContext . workspaceState . get . mockReturnValueOnce ( {
7878 '/path/to/repo' : repoState
@@ -108,16 +108,16 @@ describe('ExtensionState', () => {
108108 commitOrdering : RepoCommitOrdering . Default ,
109109 fileViewType : FileViewType . Default ,
110110 hideRemotes : [ ] ,
111- includeCommitsMentionedByReflogs : IncludeCommitsMentionedByReflogs . Default ,
111+ includeCommitsMentionedByReflogs : BooleanOverride . Default ,
112112 issueLinkingConfig : null ,
113113 name : null ,
114- onlyFollowFirstParent : OnlyFollowFirstParent . Default ,
115- onRepoLoadShowCheckedOutBranch : ShowCheckedOutBranch . Default ,
114+ onlyFollowFirstParent : BooleanOverride . Default ,
115+ onRepoLoadShowCheckedOutBranch : BooleanOverride . Default ,
116116 onRepoLoadShowSpecificBranches : null ,
117117 pullRequestConfig : null ,
118118 showRemoteBranches : true ,
119- showRemoteBranchesV2 : ShowRemoteBranches . Default ,
120- showTags : ShowTags . Default
119+ showRemoteBranchesV2 : BooleanOverride . Default ,
120+ showTags : BooleanOverride . Default
121121 }
122122 } ) ;
123123 } ) ;
@@ -143,16 +143,16 @@ describe('ExtensionState', () => {
143143 commitOrdering : RepoCommitOrdering . Default ,
144144 fileViewType : FileViewType . Default ,
145145 hideRemotes : [ ] ,
146- includeCommitsMentionedByReflogs : IncludeCommitsMentionedByReflogs . Default ,
146+ includeCommitsMentionedByReflogs : BooleanOverride . Default ,
147147 issueLinkingConfig : null ,
148148 name : null ,
149- onlyFollowFirstParent : OnlyFollowFirstParent . Default ,
150- onRepoLoadShowCheckedOutBranch : ShowCheckedOutBranch . Default ,
149+ onlyFollowFirstParent : BooleanOverride . Default ,
150+ onRepoLoadShowCheckedOutBranch : BooleanOverride . Default ,
151151 onRepoLoadShowSpecificBranches : null ,
152152 pullRequestConfig : null ,
153153 showRemoteBranches : true ,
154- showRemoteBranchesV2 : ShowRemoteBranches . Default ,
155- showTags : ShowTags . Default
154+ showRemoteBranchesV2 : BooleanOverride . Default ,
155+ showTags : BooleanOverride . Default
156156 }
157157 } ) ;
158158 } ) ;
@@ -178,16 +178,16 @@ describe('ExtensionState', () => {
178178 commitOrdering : RepoCommitOrdering . Default ,
179179 fileViewType : FileViewType . Default ,
180180 hideRemotes : [ ] ,
181- includeCommitsMentionedByReflogs : IncludeCommitsMentionedByReflogs . Default ,
181+ includeCommitsMentionedByReflogs : BooleanOverride . Default ,
182182 issueLinkingConfig : null ,
183183 name : null ,
184- onlyFollowFirstParent : OnlyFollowFirstParent . Default ,
185- onRepoLoadShowCheckedOutBranch : ShowCheckedOutBranch . Default ,
184+ onlyFollowFirstParent : BooleanOverride . Default ,
185+ onRepoLoadShowCheckedOutBranch : BooleanOverride . Default ,
186186 onRepoLoadShowSpecificBranches : null ,
187187 pullRequestConfig : null ,
188188 showRemoteBranches : false ,
189- showRemoteBranchesV2 : ShowRemoteBranches . Hide ,
190- showTags : ShowTags . Default
189+ showRemoteBranchesV2 : BooleanOverride . Disabled ,
190+ showTags : BooleanOverride . Default
191191 }
192192 } ) ;
193193 } ) ;
@@ -213,16 +213,16 @@ describe('ExtensionState', () => {
213213 commitOrdering : RepoCommitOrdering . Default ,
214214 fileViewType : FileViewType . Default ,
215215 hideRemotes : [ ] ,
216- includeCommitsMentionedByReflogs : IncludeCommitsMentionedByReflogs . Default ,
216+ includeCommitsMentionedByReflogs : BooleanOverride . Default ,
217217 issueLinkingConfig : null ,
218218 name : null ,
219- onlyFollowFirstParent : OnlyFollowFirstParent . Default ,
220- onRepoLoadShowCheckedOutBranch : ShowCheckedOutBranch . Default ,
219+ onlyFollowFirstParent : BooleanOverride . Default ,
220+ onRepoLoadShowCheckedOutBranch : BooleanOverride . Default ,
221221 onRepoLoadShowSpecificBranches : null ,
222222 pullRequestConfig : null ,
223223 showRemoteBranches : false ,
224- showRemoteBranchesV2 : ShowRemoteBranches . Default ,
225- showTags : ShowTags . Default
224+ showRemoteBranchesV2 : BooleanOverride . Default ,
225+ showTags : BooleanOverride . Default
226226 }
227227 } ) ;
228228 } ) ;
@@ -248,16 +248,16 @@ describe('ExtensionState', () => {
248248 commitOrdering : RepoCommitOrdering . Default ,
249249 fileViewType : FileViewType . Default ,
250250 hideRemotes : [ ] ,
251- includeCommitsMentionedByReflogs : IncludeCommitsMentionedByReflogs . Default ,
251+ includeCommitsMentionedByReflogs : BooleanOverride . Default ,
252252 issueLinkingConfig : null ,
253253 name : null ,
254- onlyFollowFirstParent : OnlyFollowFirstParent . Default ,
255- onRepoLoadShowCheckedOutBranch : ShowCheckedOutBranch . Default ,
254+ onlyFollowFirstParent : BooleanOverride . Default ,
255+ onRepoLoadShowCheckedOutBranch : BooleanOverride . Default ,
256256 onRepoLoadShowSpecificBranches : null ,
257257 pullRequestConfig : null ,
258258 showRemoteBranches : true ,
259- showRemoteBranchesV2 : ShowRemoteBranches . Show ,
260- showTags : ShowTags . Default
259+ showRemoteBranchesV2 : BooleanOverride . Enabled ,
260+ showTags : BooleanOverride . Default
261261 }
262262 } ) ;
263263 } ) ;
@@ -286,16 +286,16 @@ describe('ExtensionState', () => {
286286 commitOrdering : RepoCommitOrdering . Default ,
287287 fileViewType : FileViewType . Default ,
288288 hideRemotes : [ ] ,
289- includeCommitsMentionedByReflogs : IncludeCommitsMentionedByReflogs . Default ,
289+ includeCommitsMentionedByReflogs : BooleanOverride . Default ,
290290 issueLinkingConfig : null ,
291291 name : null ,
292- onlyFollowFirstParent : OnlyFollowFirstParent . Default ,
293- onRepoLoadShowCheckedOutBranch : ShowCheckedOutBranch . Default ,
292+ onlyFollowFirstParent : BooleanOverride . Default ,
293+ onRepoLoadShowCheckedOutBranch : BooleanOverride . Default ,
294294 onRepoLoadShowSpecificBranches : null ,
295295 pullRequestConfig : null ,
296296 showRemoteBranches : true ,
297- showRemoteBranchesV2 : ShowRemoteBranches . Default ,
298- showTags : ShowTags . Default
297+ showRemoteBranchesV2 : BooleanOverride . Default ,
298+ showTags : BooleanOverride . Default
299299 } ,
300300 '/path/to/repo-2' : {
301301 cdvDivider : 0.5 ,
@@ -304,16 +304,16 @@ describe('ExtensionState', () => {
304304 commitOrdering : RepoCommitOrdering . Default ,
305305 fileViewType : FileViewType . Default ,
306306 hideRemotes : [ ] ,
307- includeCommitsMentionedByReflogs : IncludeCommitsMentionedByReflogs . Default ,
307+ includeCommitsMentionedByReflogs : BooleanOverride . Default ,
308308 issueLinkingConfig : null ,
309309 name : null ,
310- onlyFollowFirstParent : OnlyFollowFirstParent . Default ,
311- onRepoLoadShowCheckedOutBranch : ShowCheckedOutBranch . Default ,
310+ onlyFollowFirstParent : BooleanOverride . Default ,
311+ onRepoLoadShowCheckedOutBranch : BooleanOverride . Default ,
312312 onRepoLoadShowSpecificBranches : null ,
313313 pullRequestConfig : null ,
314314 showRemoteBranches : false ,
315- showRemoteBranchesV2 : ShowRemoteBranches . Hide ,
316- showTags : ShowTags . Default
315+ showRemoteBranchesV2 : BooleanOverride . Disabled ,
316+ showTags : BooleanOverride . Default
317317 }
318318 } ) ;
319319 expect ( workspaceConfiguration . get ) . toHaveBeenCalledTimes ( 1 ) ;
0 commit comments