@@ -113,9 +113,9 @@ export interface RepositoryVisibilityInfo {
113113}
114114
115115export interface GitProviderRepository {
116- addRemote ( repoPath : string , name : string , url : string , options ?: { fetch ?: boolean } ) : Promise < void > ;
117- pruneRemote ( repoPath : string , name : string ) : Promise < void > ;
118- removeRemote ( repoPath : string , name : string ) : Promise < void > ;
116+ addRemote ? ( repoPath : string , name : string , url : string , options ?: { fetch ?: boolean } ) : Promise < void > ;
117+ pruneRemote ? ( repoPath : string , name : string ) : Promise < void > ;
118+ removeRemote ? ( repoPath : string , name : string ) : Promise < void > ;
119119 applyUnreachableCommitForPatch ?(
120120 repoPath : string ,
121121 ref : string ,
@@ -126,7 +126,7 @@ export interface GitProviderRepository {
126126 stash ?: boolean | 'prompt' ;
127127 } ,
128128 ) : Promise < void > ;
129- checkout (
129+ checkout ? (
130130 repoPath : string ,
131131 ref : string ,
132132 options ?: { createBranch ?: string | undefined } | { path ?: string | undefined } ,
@@ -139,7 +139,7 @@ export interface GitProviderRepository {
139139 ) : Promise < GitCommit | undefined > ;
140140 excludeIgnoredUris ( repoPath : string , uris : Uri [ ] ) : Promise < Uri [ ] > ;
141141
142- fetch (
142+ fetch ? (
143143 repoPath : string ,
144144 options ?: {
145145 all ?: boolean | undefined ;
@@ -149,15 +149,15 @@ export interface GitProviderRepository {
149149 remote ?: string | undefined ;
150150 } ,
151151 ) : Promise < void > ;
152- pull (
152+ pull ? (
153153 repoPath : string ,
154154 options ?: {
155155 branch ?: GitBranchReference | undefined ;
156156 rebase ?: boolean | undefined ;
157157 tags ?: boolean | undefined ;
158158 } ,
159159 ) : Promise < void > ;
160- push (
160+ push ? (
161161 repoPath : string ,
162162 options ?: {
163163 reference ?: GitReference | undefined ;
@@ -333,7 +333,7 @@ export interface GitProviderRepository {
333333 options ?: { filter ?: ( remote : GitRemote ) => boolean ; sort ?: boolean } ,
334334 ) : Promise < GitRemote [ ] > ;
335335 getRevisionContent ( repoPath : string , path : string , ref : string ) : Promise < Uint8Array | undefined > ;
336- getStash ( repoPath : string | undefined ) : Promise < GitStash | undefined > ;
336+ getStash ? ( repoPath : string | undefined ) : Promise < GitStash | undefined > ;
337337 getStatus ( repoPath : string | undefined ) : Promise < GitStatus | undefined > ;
338338 getStatusForFile ( repoPath : string , uri : Uri ) : Promise < GitStatusFile | undefined > ;
339339 getStatusForFiles ( repoPath : string , pathOrGlob : Uri ) : Promise < GitStatusFile [ ] | undefined > ;
@@ -359,8 +359,8 @@ export interface GitProviderRepository {
359359 hasCommitBeenPushed ( repoPath : string , ref : string ) : Promise < boolean > ;
360360 isAncestorOf ( repoPath : string , ref1 : string , ref2 : string ) : Promise < boolean > ;
361361
362- getDiffTool ( repoPath ?: string ) : Promise < string | undefined > ;
363- openDiffTool (
362+ getDiffTool ? ( repoPath ?: string ) : Promise < string | undefined > ;
363+ openDiffTool ? (
364364 repoPath : string ,
365365 uri : Uri ,
366366 options ?: {
@@ -370,7 +370,7 @@ export interface GitProviderRepository {
370370 tool ?: string | undefined ;
371371 } ,
372372 ) : Promise < void > ;
373- openDirectoryCompare ( repoPath : string , ref1 : string , ref2 ?: string , tool ?: string ) : Promise < void > ;
373+ openDirectoryCompare ? ( repoPath : string , ref1 : string , ref2 ?: string , tool ?: string ) : Promise < void > ;
374374
375375 resolveReference (
376376 repoPath : string ,
@@ -413,16 +413,16 @@ export interface GitProviderRepository {
413413 unstageFile ( repoPath : string , pathOrUri : string | Uri ) : Promise < void > ;
414414 unstageDirectory ( repoPath : string , directoryOrUri : string | Uri ) : Promise < void > ;
415415
416- stashApply ?( repoPath : string , stashName : string , options ?: { deleteAfter ?: boolean | undefined } ) : Promise < void > ;
417- stashDelete ?( repoPath : string , stashName : string , ref ?: string ) : Promise < void > ;
418- stashRename ?( repoPath : string , stashName : string , ref : string , message : string , stashOnRef ?: string ) : Promise < void > ;
419- stashSave ?(
416+ applyStash ?( repoPath : string , stashName : string , options ?: { deleteAfter ?: boolean | undefined } ) : Promise < void > ;
417+ deleteStash ?( repoPath : string , stashName : string , ref ?: string ) : Promise < void > ;
418+ renameStash ?( repoPath : string , stashName : string , ref : string , message : string , stashOnRef ?: string ) : Promise < void > ;
419+ saveStash ?(
420420 repoPath : string ,
421421 message ?: string ,
422422 uris ?: Uri [ ] ,
423423 options ?: { includeUntracked ?: boolean ; keepIndex ?: boolean ; onlyStaged ?: boolean } ,
424424 ) : Promise < void > ;
425- stashSaveSnapshot ?( repoPath : string , message ?: string ) : Promise < void > ;
425+ saveStashSnapshot ?( repoPath : string , message ?: string ) : Promise < void > ;
426426
427427 createWorktree ?(
428428 repoPath : string ,
@@ -476,7 +476,7 @@ export interface GitProvider extends GitProviderRepository, Disposable {
476476 // getRootUri(pathOrUri: string | Uri): Uri;
477477 getWorkingUri ( repoPath : string , uri : Uri ) : Promise < Uri | undefined > ;
478478
479- applyChangesToWorkingFile ( uri : GitUri , ref1 ?: string , ref2 ?: string ) : Promise < void > ;
479+ applyChangesToWorkingFile ? ( uri : GitUri , ref1 ?: string , ref2 ?: string ) : Promise < void > ;
480480 clone ?( url : string , parentPath : string ) : Promise < string | undefined > ;
481481 /**
482482 * Returns the blame of a file
0 commit comments