fix(git-ext): fix limitWarning block the git status progress (#226577)

pull/236695/head
zWing 2024-12-20 18:29:31 +08:00 committed by GitHub
parent eb66332871
commit 1730c76f6b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 15 additions and 13 deletions

View File

@ -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;
});
}
}