Skip to content

Commit 1730c76

Browse files
authored
fix(git-ext): fix limitWarning block the git status progress (microsoft#226577)
1 parent eb66332 commit 1730c76

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

extensions/git/src/repository.ts

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2359,24 +2359,26 @@ export class Repository implements Disposable {
23592359
const yes = { title: l10n.t('Yes') };
23602360
const no = { title: l10n.t('No') };
23612361

2362-
const result = await window.showWarningMessage(`${gitWarn} ${addKnown}`, yes, no, neverAgain);
2363-
if (result === yes) {
2364-
this.ignore([Uri.file(folderPath)]);
2365-
} else {
2362+
window.showWarningMessage(`${gitWarn} ${addKnown}`, yes, no, neverAgain).then(result => {
2363+
if (result === yes) {
2364+
this.ignore([Uri.file(folderPath)]);
2365+
} else {
2366+
if (result === neverAgain) {
2367+
config.update('ignoreLimitWarning', true, false);
2368+
}
2369+
2370+
this.didWarnAboutLimit = true;
2371+
}
2372+
});
2373+
} else {
2374+
const ok = { title: l10n.t('OK') };
2375+
window.showWarningMessage(gitWarn, ok, neverAgain).then(result => {
23662376
if (result === neverAgain) {
23672377
config.update('ignoreLimitWarning', true, false);
23682378
}
23692379

23702380
this.didWarnAboutLimit = true;
2371-
}
2372-
} else {
2373-
const ok = { title: l10n.t('OK') };
2374-
const result = await window.showWarningMessage(gitWarn, ok, neverAgain);
2375-
if (result === neverAgain) {
2376-
config.update('ignoreLimitWarning', true, false);
2377-
}
2378-
2379-
this.didWarnAboutLimit = true;
2381+
});
23802382
}
23812383
}
23822384

0 commit comments

Comments
 (0)