From 1730c76f6b3f2d6ab5819031cded0a6e24d54b6e Mon Sep 17 00:00:00 2001 From: zWing <371657110@qq.com> Date: Fri, 20 Dec 2024 18:29:31 +0800 Subject: [PATCH] fix(git-ext): fix limitWarning block the git status progress (#226577) --- extensions/git/src/repository.ts | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index 0c4b50cd5e5..9e6e0196abe 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -2359,24 +2359,26 @@ export class Repository implements Disposable { const yes = { title: l10n.t('Yes') }; const no = { title: l10n.t('No') }; - const result = await window.showWarningMessage(`${gitWarn} ${addKnown}`, yes, no, neverAgain); - if (result === yes) { - this.ignore([Uri.file(folderPath)]); - } else { + window.showWarningMessage(`${gitWarn} ${addKnown}`, yes, no, neverAgain).then(result => { + if (result === yes) { + this.ignore([Uri.file(folderPath)]); + } else { + if (result === neverAgain) { + config.update('ignoreLimitWarning', true, false); + } + + this.didWarnAboutLimit = true; + } + }); + } else { + const ok = { title: l10n.t('OK') }; + window.showWarningMessage(gitWarn, ok, neverAgain).then(result => { if (result === neverAgain) { config.update('ignoreLimitWarning', true, false); } this.didWarnAboutLimit = true; - } - } else { - const ok = { title: l10n.t('OK') }; - const result = await window.showWarningMessage(gitWarn, ok, neverAgain); - if (result === neverAgain) { - config.update('ignoreLimitWarning', true, false); - } - - this.didWarnAboutLimit = true; + }); } }