mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-15 17:25:33 -05:00
Attempts to fix #58 - work with sub-modules
Also fixes issue with nested repos
This commit is contained in:
@@ -668,13 +668,10 @@ export class GitService extends Disposable {
|
||||
return log && log.repoPath;
|
||||
}
|
||||
|
||||
async getRepoPathFromUri(uri?: Uri, fallbackRepoPath?: string): Promise<string | undefined> {
|
||||
if (!(uri instanceof Uri)) return fallbackRepoPath;
|
||||
async getRepoPathFromUri(uri: Uri | undefined): Promise<string | undefined> {
|
||||
if (!(uri instanceof Uri)) return this.repoPath;
|
||||
|
||||
const gitUri = await GitUri.fromUri(uri, this);
|
||||
if (gitUri.repoPath) return gitUri.repoPath;
|
||||
|
||||
return (await this.getRepoPathFromFile(gitUri.fsPath)) || fallbackRepoPath;
|
||||
return (await GitUri.fromUri(uri, this)).repoPath || this.repoPath;
|
||||
}
|
||||
|
||||
async getStashList(repoPath: string): Promise<IGitStash> {
|
||||
|
||||
Reference in New Issue
Block a user