Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7b8759b

Browse files
committedOct 4, 2024
add message & sort supress keys
1 parent 65d86ab commit 7b8759b

File tree

3 files changed

+24
-10
lines changed

3 files changed

+24
-10
lines changed
 

‎package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4573,22 +4573,23 @@
45734573
"gitlens.advanced.messages": {
45744574
"type": "object",
45754575
"default": {
4576+
"suppressBlameInvalidIgnoreRevsFileBadRevisionWarning": false,
4577+
"suppressBlameInvalidIgnoreRevsFileWarning": false,
45764578
"suppressCommitHasNoPreviousCommitWarning": false,
45774579
"suppressCommitNotFoundWarning": false,
45784580
"suppressCreatePullRequestPrompt": false,
45794581
"suppressDebugLoggingWarning": false,
45804582
"suppressFileNotUnderSourceControlWarning": false,
4583+
"suppressGitBranchNotFullyMergedWarning": false,
45814584
"suppressGitDisabledWarning": false,
45824585
"suppressGitMissingWarning": false,
45834586
"suppressGitVersionWarning": false,
4584-
"suppressLineUncommittedWarning": false,
4585-
"suppressNoRepositoryWarning": false,
4586-
"suppressRebaseSwitchToTextWarning": false,
45874587
"suppressIntegrationDisconnectedTooManyFailedRequestsWarning": false,
45884588
"suppressIntegrationRequestFailed500Warning": false,
45894589
"suppressIntegrationRequestTimedOutWarning": false,
4590-
"suppressBlameInvalidIgnoreRevsFileWarning": false,
4591-
"suppressBlameInvalidIgnoreRevsFileBadRevisionWarning": false
4590+
"suppressLineUncommittedWarning": false,
4591+
"suppressNoRepositoryWarning": false,
4592+
"suppressRebaseSwitchToTextWarning": false
45924593
},
45934594
"properties": {
45944595
"suppressCommitHasNoPreviousCommitWarning": {

‎src/config.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -576,25 +576,26 @@ export interface RemotesUrlsConfig {
576576

577577
// NOTE: Must be kept in sync with `gitlens.advanced.messages` setting in the package.json
578578
export type SuppressedMessages =
579+
| 'suppressBlameInvalidIgnoreRevsFileBadRevisionWarning'
580+
| 'suppressBlameInvalidIgnoreRevsFileWarning'
579581
| 'suppressCommitHasNoPreviousCommitWarning'
580582
| 'suppressCommitNotFoundWarning'
581583
| 'suppressCreatePullRequestPrompt'
582584
| 'suppressDebugLoggingWarning'
583585
| 'suppressFileNotUnderSourceControlWarning'
586+
| 'suppressGitBranchNotFullyMergedWarning'
584587
| 'suppressGitDisabledWarning'
585588
| 'suppressGitMissingWarning'
586589
| 'suppressGitVersionWarning'
587-
| 'suppressLineUncommittedWarning'
588-
| 'suppressNoRepositoryWarning'
589-
| 'suppressRebaseSwitchToTextWarning'
590590
| 'suppressGkDisconnectedTooManyFailedRequestsWarningMessage'
591591
| 'suppressGkRequestFailed500Warning'
592592
| 'suppressGkRequestTimedOutWarning'
593593
| 'suppressIntegrationDisconnectedTooManyFailedRequestsWarning'
594594
| 'suppressIntegrationRequestFailed500Warning'
595595
| 'suppressIntegrationRequestTimedOutWarning'
596-
| 'suppressBlameInvalidIgnoreRevsFileWarning'
597-
| 'suppressBlameInvalidIgnoreRevsFileBadRevisionWarning';
596+
| 'suppressLineUncommittedWarning'
597+
| 'suppressNoRepositoryWarning'
598+
| 'suppressRebaseSwitchToTextWarning';
598599

599600
export interface ViewsCommonConfig {
600601
readonly collapseWorktreesWhenPossible: boolean;

‎src/messages.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,18 @@ export function showGitVersionUnsupportedErrorMessage(
137137
);
138138
}
139139

140+
export async function showGitBranchNotFullyMergedPrompt(branchName: string): Promise<MessageItem | undefined> {
141+
const confirm = { title: 'Retry with --force flag' };
142+
const result = await showMessage(
143+
'warn',
144+
`Unable to delete branch '${branchName}'. It is not fully merged.`,
145+
'suppressGitBranchNotFullyMergedWarning',
146+
{ title: "Don't Show Again" },
147+
confirm,
148+
);
149+
return result === confirm;
150+
}
151+
140152
export function showPreReleaseExpiredErrorMessage(version: string) {
141153
return showMessage(
142154
'error',

0 commit comments

Comments
 (0)
Please sign in to comment.