Skip to content

Commit f047617

Browse files
Fixes getCommonRepository failing when the path is a git dir
1 parent 935263a commit f047617

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/git/models/repository.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -625,11 +625,11 @@ export class Repository implements Disposable {
625625
@gate()
626626
@log({ exit: true })
627627
async getCommonRepository(): Promise<Repository | undefined> {
628-
const gitDir = await this.git.config().getGitDir?.();
629-
if (gitDir?.commonUri == null) return this;
628+
const uri = await this.getCommonRepositoryUri();
629+
if (uri == null) return this;
630630

631631
// If the repository isn't already opened, then open it as a "closed" repo (won't show up in the UI)
632-
return this.container.git.getOrOpenRepository(gitDir.commonUri, {
632+
return this.container.git.getOrOpenRepository(uri, {
633633
detectNested: false,
634634
force: true,
635635
closeOnOpen: true,

0 commit comments

Comments
 (0)