Skip to content

Commit 35eddf1

Browse files
authored
Revert "Git - honor detectSubmodules and detectWorktrees settings when opening a workspace from a file" (microsoft#259005)
This reverts commit 655258b.
1 parent 629ef49 commit 35eddf1

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

extensions/git/src/model.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -647,19 +647,6 @@ export class Model implements IRepositoryResolver, IBranchProtectionProviderRegi
647647
// Open repository
648648
const [dotGit, repositoryRootRealPath] = await Promise.all([this.git.getRepositoryDotGit(repositoryRoot), this.getRepositoryRootRealPath(repositoryRoot)]);
649649
const gitRepository = this.git.open(repositoryRoot, repositoryRootRealPath, dotGit, this.logger);
650-
651-
// Check if the repository is a submodule/worktree and if they should be detected
652-
const detectSubmodules = config.get<boolean>('detectSubmodules', true) === true;
653-
const detectWorktrees = config.get<boolean>('detectWorktrees', true) === true;
654-
if ((gitRepository.kind === 'submodule' && !detectSubmodules) ||
655-
(gitRepository.kind === 'worktree' && !detectWorktrees)) {
656-
this.logger.info(`[Model][openRepository] Skip opening repository (path): ${repositoryRoot}`);
657-
this.logger.info(`[Model][openRepository] Skip opening repository (real path): ${repositoryRootRealPath ?? repositoryRoot}`);
658-
this.logger.info(`[Model][openRepository] Skip opening repository (kind): ${gitRepository.kind}`);
659-
660-
return;
661-
}
662-
663650
const repository = new Repository(gitRepository, this, this, this, this, this, this, this.globalState, this.logger, this.telemetryReporter);
664651

665652
this.open(repository);

0 commit comments

Comments
 (0)