Skip to content

Commit

Permalink
Adds logging for #2615
Browse files Browse the repository at this point in the history
  • Loading branch information
eamodio committed Oct 30, 2023
1 parent 388778c commit 90509a2
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/git/gitProviderService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 90509a2

Please sign in to comment.