mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
Git - fix commit hook setting name (#245307)
This commit is contained in:
@@ -3298,13 +3298,13 @@
|
||||
"markdownDescription": "%config.commitShortHashLength%",
|
||||
"scope": "resource"
|
||||
},
|
||||
"git.diagnosticsCommitHook.Enabled": {
|
||||
"git.diagnosticsCommitHook.enabled": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"markdownDescription": "%config.diagnosticsCommitHook.Enabled%",
|
||||
"markdownDescription": "%config.diagnosticsCommitHook.enabled%",
|
||||
"scope": "resource"
|
||||
},
|
||||
"git.diagnosticsCommitHook.Sources": {
|
||||
"git.diagnosticsCommitHook.sources": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
@@ -3319,7 +3319,7 @@
|
||||
"default": {
|
||||
"*": "error"
|
||||
},
|
||||
"markdownDescription": "%config.diagnosticsCommitHook.Sources%",
|
||||
"markdownDescription": "%config.diagnosticsCommitHook.sources%",
|
||||
"scope": "resource"
|
||||
},
|
||||
"git.discardUntrackedChangesToTrash": {
|
||||
|
||||
@@ -286,8 +286,8 @@
|
||||
"config.blameStatusBarItem.enabled": "Controls whether to show blame information in the status bar.",
|
||||
"config.blameStatusBarItem.template": "Template for the blame information status bar item. Supported variables:\n\n* `hash`: Commit hash\n\n* `hashShort`: First N characters of the commit hash according to `#git.commitShortHashLength#`\n\n* `subject`: First line of the commit message\n\n* `authorName`: Author name\n\n* `authorEmail`: Author email\n\n* `authorDate`: Author date\n\n* `authorDateAgo`: Time difference between now and the author date\n\n",
|
||||
"config.commitShortHashLength": "Controls the length of the commit short hash.",
|
||||
"config.diagnosticsCommitHook.Enabled": "Controls whether to check for unresolved diagnostics before committing.",
|
||||
"config.diagnosticsCommitHook.Sources": "Controls the list of sources (**Item**) and the minimum severity (**Value**) to be considered before committing. **Note:** To ignore diagnostics from a particular source, add the source to the list and set the minimum severity to `none`.",
|
||||
"config.diagnosticsCommitHook.enabled": "Controls whether to check for unresolved diagnostics before committing.",
|
||||
"config.diagnosticsCommitHook.sources": "Controls the list of sources (**Item**) and the minimum severity (**Value**) to be considered before committing. **Note:** To ignore diagnostics from a particular source, add the source to the list and set the minimum severity to `none`.",
|
||||
"config.discardUntrackedChangesToTrash": "Controls whether discarding untracked changes moves the file(s) to the Recycle Bin (Windows), Trash (macOS, Linux) instead of deleting them permanently. **Note:** This setting has no effect when connected to a remote or when running in Linux as a snap package.",
|
||||
"config.showReferenceDetails": "Controls whether to show the details of the last commit for Git refs in the checkout, branch, and tag pickers.",
|
||||
"submenu.explorer": "Git",
|
||||
|
||||
@@ -632,8 +632,8 @@ class CommandErrorOutputTextDocumentContentProvider implements TextDocumentConte
|
||||
|
||||
async function evaluateDiagnosticsCommitHook(repository: Repository, options: CommitOptions): Promise<boolean> {
|
||||
const config = workspace.getConfiguration('git', Uri.file(repository.root));
|
||||
const enabled = config.get<boolean>('diagnosticsCommitHook.Enabled', false) === true;
|
||||
const sourceSeverity = config.get<Record<string, DiagnosticSeverityConfig>>('diagnosticsCommitHook.Sources', { '*': 'error' });
|
||||
const enabled = config.get<boolean>('diagnosticsCommitHook.enabled', false) === true;
|
||||
const sourceSeverity = config.get<Record<string, DiagnosticSeverityConfig>>('diagnosticsCommitHook.sources', { '*': 'error' });
|
||||
|
||||
if (!enabled) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user