diff --git a/package.json b/package.json index 680d90b..fc953f1 100644 --- a/package.json +++ b/package.json @@ -2815,7 +2815,6 @@ "suppressGitDisabledWarning": false, "suppressGitMissingWarning": false, "suppressGitVersionWarning": false, - "suppressImproperWorkspaceCasingWarning": false, "suppressLineUncommittedWarning": false, "suppressNoRepositoryWarning": false, "suppressRebaseSwitchToTextWarning": false @@ -2861,11 +2860,6 @@ "default": false, "description": "Git Version Warning" }, - "suppressImproperWorkspaceCasingWarning": { - "type": "boolean", - "default": false, - "description": "Improper Workspace Casing Warning" - }, "suppressLineUncommittedWarning": { "type": "boolean", "default": false, diff --git a/src/config.ts b/src/config.ts index 85bec6b..dd7ee52 100644 --- a/src/config.ts +++ b/src/config.ts @@ -340,7 +340,6 @@ export interface AdvancedConfig { suppressGitDisabledWarning: boolean; suppressGitMissingWarning: boolean; suppressGitVersionWarning: boolean; - suppressImproperWorkspaceCasingWarning: boolean; suppressLineUncommittedWarning: boolean; suppressNoRepositoryWarning: boolean; suppressRebaseSwitchToTextWarning: boolean; diff --git a/src/env/node/git/localGitProvider.ts b/src/env/node/git/localGitProvider.ts index 051181e..a2d8d36 100644 --- a/src/env/node/git/localGitProvider.ts +++ b/src/env/node/git/localGitProvider.ts @@ -720,37 +720,7 @@ export class LocalGitProvider implements GitProvider, Disposable { return repoPath ? Uri.file(repoPath) : undefined; } catch (ex) { Logger.error(ex, cc); - repoPath = undefined; - return repoPath; - } finally { - if (repoPath) { - void this.ensureProperWorkspaceCasing(repoPath, uri); - } - } - } - - @gate(() => '') - private async ensureProperWorkspaceCasing(repoPath: string, uri: Uri) { - if (this.container.config.advanced.messages.suppressImproperWorkspaceCasingWarning) return; - - const path = uri.fsPath.replace(/\\/g, '/'); - - let regexPath; - let testPath; - if (path > repoPath) { - regexPath = path; - testPath = repoPath; - } else { - testPath = path; - regexPath = repoPath; - } - - let pathRegex = new RegExp(`^${regexPath}`); - if (!pathRegex.test(testPath)) { - pathRegex = new RegExp(pathRegex, 'i'); - if (pathRegex.test(testPath)) { - await Messages.showIncorrectWorkspaceCasingWarningMessage(); - } + return undefined; } } diff --git a/src/messages.ts b/src/messages.ts index e48ca2d..5bb774c 100644 --- a/src/messages.ts +++ b/src/messages.ts @@ -13,7 +13,6 @@ export const enum SuppressedMessages { GitDisabledWarning = 'suppressGitDisabledWarning', GitMissingWarning = 'suppressGitMissingWarning', GitVersionWarning = 'suppressGitVersionWarning', - IncorrectWorkspaceCasingWarning = 'suppressImproperWorkspaceCasingWarning', LineUncommittedWarning = 'suppressLineUncommittedWarning', NoRepositoryWarning = 'suppressNoRepositoryWarning', RebaseSwitchToTextWarning = 'suppressRebaseSwitchToTextWarning', @@ -123,14 +122,6 @@ export class Messages { ); } - static async showIncorrectWorkspaceCasingWarningMessage(): Promise { - void (await Messages.showMessage( - 'warn', - 'This workspace was opened with a different casing than what exists on disk. Please re-open this workspace with the exact casing as it exists on disk, otherwise you may experience issues with certain Git features, such as missing blame or history.', - SuppressedMessages.IncorrectWorkspaceCasingWarning, - )); - } - static showInsidersErrorMessage() { return Messages.showMessage( 'error',