Skip to content

Commit 18d683b

Browse files
committed
Fixes #685, #789 - avoids errors in repo search
1 parent da072f0 commit 18d683b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
88

99
### Fixed
1010

11+
- Fixes [#685](https://github.com/eamodio/vscode-gitlens/issues/685) - GitLens not loading for a single repository
12+
- Fixes [#789](https://github.com/eamodio/vscode-gitlens/issues/789) - Line blame annotations not working when vscode root is home dir and .gnupg dir is inaccessible
1113
- Fixes [#649](https://github.com/eamodio/vscode-gitlens/issues/649) - GitLens can't see the remote but git can
1214
- Fixes [#798](https://github.com/eamodio/vscode-gitlens/issues/798) - git pull/fetch all repositories
1315
- Fixes [#805](https://github.com/eamodio/vscode-gitlens/issues/805) - Version 9.9.1 breaks working tree comparison

src/git/gitService.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,8 @@ export class GitService implements Disposable {
369369
excludes: { [key: string]: boolean },
370370
repositories: string[] = []
371371
): Promise<string[]> {
372+
const cc = Logger.getCorrelationContext();
373+
372374
return new Promise<string[]>((resolve, reject) => {
373375
fs.readdir(root, { withFileTypes: true }, async (err, files) => {
374376
if (err != null) {
@@ -391,7 +393,12 @@ export class GitService implements Disposable {
391393
repositories.push(paths.resolve(root, f.name));
392394
}
393395
else if (depth >= 0 && excludes[f.name] !== true) {
394-
await this.repositorySearchCore(paths.resolve(root, f.name), depth, excludes, repositories);
396+
try {
397+
await this.repositorySearchCore(paths.resolve(root, f.name), depth, excludes, repositories);
398+
}
399+
catch (ex) {
400+
Logger.error(ex, cc, 'FAILED');
401+
}
395402
}
396403
}
397404

0 commit comments

Comments
 (0)