@@ -113,9 +113,9 @@ export interface RepositoryVisibilityInfo {
113
113
}
114
114
115
115
export 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 > ;
119
119
applyUnreachableCommitForPatch ?(
120
120
repoPath : string ,
121
121
ref : string ,
@@ -126,7 +126,7 @@ export interface GitProviderRepository {
126
126
stash ?: boolean | 'prompt' ;
127
127
} ,
128
128
) : Promise < void > ;
129
- checkout (
129
+ checkout ? (
130
130
repoPath : string ,
131
131
ref : string ,
132
132
options ?: { createBranch ?: string | undefined } | { path ?: string | undefined } ,
@@ -139,7 +139,7 @@ export interface GitProviderRepository {
139
139
) : Promise < GitCommit | undefined > ;
140
140
excludeIgnoredUris ( repoPath : string , uris : Uri [ ] ) : Promise < Uri [ ] > ;
141
141
142
- fetch (
142
+ fetch ? (
143
143
repoPath : string ,
144
144
options ?: {
145
145
all ?: boolean | undefined ;
@@ -149,15 +149,15 @@ export interface GitProviderRepository {
149
149
remote ?: string | undefined ;
150
150
} ,
151
151
) : Promise < void > ;
152
- pull (
152
+ pull ? (
153
153
repoPath : string ,
154
154
options ?: {
155
155
branch ?: GitBranchReference | undefined ;
156
156
rebase ?: boolean | undefined ;
157
157
tags ?: boolean | undefined ;
158
158
} ,
159
159
) : Promise < void > ;
160
- push (
160
+ push ? (
161
161
repoPath : string ,
162
162
options ?: {
163
163
reference ?: GitReference | undefined ;
@@ -333,7 +333,7 @@ export interface GitProviderRepository {
333
333
options ?: { filter ?: ( remote : GitRemote ) => boolean ; sort ?: boolean } ,
334
334
) : Promise < GitRemote [ ] > ;
335
335
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 > ;
337
337
getStatus ( repoPath : string | undefined ) : Promise < GitStatus | undefined > ;
338
338
getStatusForFile ( repoPath : string , uri : Uri ) : Promise < GitStatusFile | undefined > ;
339
339
getStatusForFiles ( repoPath : string , pathOrGlob : Uri ) : Promise < GitStatusFile [ ] | undefined > ;
@@ -359,8 +359,8 @@ export interface GitProviderRepository {
359
359
hasCommitBeenPushed ( repoPath : string , ref : string ) : Promise < boolean > ;
360
360
isAncestorOf ( repoPath : string , ref1 : string , ref2 : string ) : Promise < boolean > ;
361
361
362
- getDiffTool ( repoPath ?: string ) : Promise < string | undefined > ;
363
- openDiffTool (
362
+ getDiffTool ? ( repoPath ?: string ) : Promise < string | undefined > ;
363
+ openDiffTool ? (
364
364
repoPath : string ,
365
365
uri : Uri ,
366
366
options ?: {
@@ -370,7 +370,7 @@ export interface GitProviderRepository {
370
370
tool ?: string | undefined ;
371
371
} ,
372
372
) : 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 > ;
374
374
375
375
resolveReference (
376
376
repoPath : string ,
@@ -413,16 +413,16 @@ export interface GitProviderRepository {
413
413
unstageFile ( repoPath : string , pathOrUri : string | Uri ) : Promise < void > ;
414
414
unstageDirectory ( repoPath : string , directoryOrUri : string | Uri ) : Promise < void > ;
415
415
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 ?(
420
420
repoPath : string ,
421
421
message ?: string ,
422
422
uris ?: Uri [ ] ,
423
423
options ?: { includeUntracked ?: boolean ; keepIndex ?: boolean ; onlyStaged ?: boolean } ,
424
424
) : Promise < void > ;
425
- stashSaveSnapshot ?( repoPath : string , message ?: string ) : Promise < void > ;
425
+ saveStashSnapshot ?( repoPath : string , message ?: string ) : Promise < void > ;
426
426
427
427
createWorktree ?(
428
428
repoPath : string ,
@@ -476,7 +476,7 @@ export interface GitProvider extends GitProviderRepository, Disposable {
476
476
// getRootUri(pathOrUri: string | Uri): Uri;
477
477
getWorkingUri ( repoPath : string , uri : Uri ) : Promise < Uri | undefined > ;
478
478
479
- applyChangesToWorkingFile ( uri : GitUri , ref1 ?: string , ref2 ?: string ) : Promise < void > ;
479
+ applyChangesToWorkingFile ? ( uri : GitUri , ref1 ?: string , ref2 ?: string ) : Promise < void > ;
480
480
clone ?( url : string , parentPath : string ) : Promise < string | undefined > ;
481
481
/**
482
482
* Returns the blame of a file
0 commit comments