From 90509a2b38ac7dccb975e3144fa51eddb5c08125 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Mon, 30 Oct 2023 01:37:13 -0400 Subject: [PATCH] Adds logging for #2615 --- src/git/gitProviderService.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/git/gitProviderService.ts b/src/git/gitProviderService.ts index 20bc734..6d6dce2 100644 --- a/src/git/gitProviderService.ts +++ b/src/git/gitProviderService.ts @@ -2284,10 +2284,20 @@ export class GitProviderService implements Disposable { return repository; } else { const stats = await workspace.fs.stat(uri); + + const bestPath = getBestPath(uri); + + Logger.debug( + scope, + `Ensuring URI is a folder; repository=${repository?.toString()}, uri=${uri.toString(true)} stats.type=${ + stats.type + }, bestPath=${bestPath}, visitedPaths.has=${this._visitedPaths.has(bestPath)}`, + ); + // If the uri isn't a directory, go up one level if ((stats.type & FileType.Directory) !== FileType.Directory) { uri = Uri.joinPath(uri, '..'); - if (!options?.force && this._visitedPaths.has(getBestPath(uri))) return repository; + if (!options?.force && this._visitedPaths.has(bestPath)) return repository; } isDirectory = true;