|
@ -2358,13 +2358,36 @@ export class GitProviderService implements Disposable { |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
getOrOpenRepository( |
|
|
|
|
|
uri: Uri, |
|
|
|
|
|
options?: { closeOnOpen?: boolean; detectNested?: boolean; force?: boolean }, |
|
|
|
|
|
): Promise<Repository | undefined>; |
|
|
|
|
|
getOrOpenRepository( |
|
|
|
|
|
path: string, |
|
|
|
|
|
options?: { closeOnOpen?: boolean; detectNested?: boolean; force?: boolean }, |
|
|
|
|
|
): Promise<Repository | undefined>; |
|
|
|
|
|
getOrOpenRepository( |
|
|
|
|
|
pathOrUri: string | Uri, |
|
|
|
|
|
options?: { closeOnOpen?: boolean; detectNested?: boolean; force?: boolean }, |
|
|
|
|
|
): Promise<Repository | undefined>; |
|
|
@log({ exit: true }) |
|
|
@log({ exit: true }) |
|
|
async getOrOpenRepository( |
|
|
async getOrOpenRepository( |
|
|
uri: Uri, |
|
|
|
|
|
|
|
|
pathOrUri?: string | Uri, |
|
|
options?: { closeOnOpen?: boolean; detectNested?: boolean; force?: boolean }, |
|
|
options?: { closeOnOpen?: boolean; detectNested?: boolean; force?: boolean }, |
|
|
): Promise<Repository | undefined> { |
|
|
): Promise<Repository | undefined> { |
|
|
|
|
|
if (pathOrUri == null) return undefined; |
|
|
|
|
|
|
|
|
const scope = getLogScope(); |
|
|
const scope = getLogScope(); |
|
|
|
|
|
|
|
|
|
|
|
let uri: Uri; |
|
|
|
|
|
if (typeof pathOrUri === 'string') { |
|
|
|
|
|
if (!pathOrUri) return undefined; |
|
|
|
|
|
|
|
|
|
|
|
uri = this.getAbsoluteUri(pathOrUri); |
|
|
|
|
|
} else { |
|
|
|
|
|
uri = pathOrUri; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const path = getBestPath(uri); |
|
|
const path = getBestPath(uri); |
|
|
let repository: Repository | undefined; |
|
|
let repository: Repository | undefined; |
|
|
repository = this.getRepository(uri); |
|
|
repository = this.getRepository(uri); |
|
|