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

This commit is contained in:
zWing
2024-12-20 18:29:31 +08:00
committed by GitHub
parent eb66332871
commit 1730c76f6b

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