1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-04-25 12:24:47 +02:00

Remove unnecesary schema validations in user config

This commit is contained in:
Karim Khaleel 2024-05-18 19:46:06 +03:00 committed by Stefan Haller
parent 6fcb7eb8bb
commit af842e40d4
2 changed files with 5 additions and 10 deletions

View File

@ -252,7 +252,7 @@ type PagingConfig struct {
// diff-so-fancy // diff-so-fancy
// delta --dark --paging=never // delta --dark --paging=never
// ydiff -p cat -s --wrap --width={{columnWidth}} // ydiff -p cat -s --wrap --width={{columnWidth}}
Pager PagerType `yaml:"pager" jsonschema:"minLength=1"` Pager PagerType `yaml:"pager"`
// If true, Lazygit will use whatever pager is specified in `$GIT_PAGER`, `$PAGER`, or your *git config*. If the pager ends with something like ` | less` we will strip that part out, because less doesn't play nice with our rendering approach. If the custom pager uses less under the hood, that will also break rendering (hence the `--paging=never` flag for the `delta` pager). // If true, Lazygit will use whatever pager is specified in `$GIT_PAGER`, `$PAGER`, or your *git config*. If the pager ends with something like ` | less` we will strip that part out, because less doesn't play nice with our rendering approach. If the custom pager uses less under the hood, that will also break rendering (hence the `--paging=never` flag for the `delta` pager).
UseConfig bool `yaml:"useConfig"` UseConfig bool `yaml:"useConfig"`
// e.g. 'difft --color=always' // e.g. 'difft --color=always'
@ -294,9 +294,9 @@ type LogConfig struct {
type CommitPrefixConfig struct { type CommitPrefixConfig struct {
// pattern to match on. E.g. for 'feature/AB-123' to match on the AB-123 use "^\\w+\\/(\\w+-\\w+).*" // pattern to match on. E.g. for 'feature/AB-123' to match on the AB-123 use "^\\w+\\/(\\w+-\\w+).*"
Pattern string `yaml:"pattern" jsonschema:"example=^\\w+\\/(\\w+-\\w+).*,minLength=1"` Pattern string `yaml:"pattern" jsonschema:"example=^\\w+\\/(\\w+-\\w+).*"`
// Replace directive. E.g. for 'feature/AB-123' to start the commit message with 'AB-123 ' use "[$1] " // Replace directive. E.g. for 'feature/AB-123' to start the commit message with 'AB-123 ' use "[$1] "
Replace string `yaml:"replace" jsonschema:"example=[$1] ,minLength=1"` Replace string `yaml:"replace" jsonschema:"example=[$1]"`
} }
type UpdateConfig struct { type UpdateConfig struct {

View File

@ -428,7 +428,6 @@
}, },
"pager": { "pager": {
"type": "string", "type": "string",
"minLength": 1,
"description": "e.g.\ndiff-so-fancy\ndelta --dark --paging=never\nydiff -p cat -s --wrap --width={{columnWidth}}", "description": "e.g.\ndiff-so-fancy\ndelta --dark --paging=never\nydiff -p cat -s --wrap --width={{columnWidth}}",
"default": "", "default": "",
"examples": [ "examples": [
@ -543,7 +542,6 @@
"properties": { "properties": {
"pattern": { "pattern": {
"type": "string", "type": "string",
"minLength": 1,
"description": "pattern to match on. E.g. for 'feature/AB-123' to match on the AB-123 use \"^\\\\w+\\\\/(\\\\w+-\\\\w+).*\"", "description": "pattern to match on. E.g. for 'feature/AB-123' to match on the AB-123 use \"^\\\\w+\\\\/(\\\\w+-\\\\w+).*\"",
"examples": [ "examples": [
"^\\w+\\/(\\w+-\\w+).*" "^\\w+\\/(\\w+-\\w+).*"
@ -551,10 +549,9 @@
}, },
"replace": { "replace": {
"type": "string", "type": "string",
"minLength": 1,
"description": "Replace directive. E.g. for 'feature/AB-123' to start the commit message with 'AB-123 ' use \"[$1] \"", "description": "Replace directive. E.g. for 'feature/AB-123' to start the commit message with 'AB-123 ' use \"[$1] \"",
"examples": [ "examples": [
"[$1] " "[$1]"
] ]
} }
}, },
@ -567,7 +564,6 @@
"properties": { "properties": {
"pattern": { "pattern": {
"type": "string", "type": "string",
"minLength": 1,
"description": "pattern to match on. E.g. for 'feature/AB-123' to match on the AB-123 use \"^\\\\w+\\\\/(\\\\w+-\\\\w+).*\"", "description": "pattern to match on. E.g. for 'feature/AB-123' to match on the AB-123 use \"^\\\\w+\\\\/(\\\\w+-\\\\w+).*\"",
"examples": [ "examples": [
"^\\w+\\/(\\w+-\\w+).*" "^\\w+\\/(\\w+-\\w+).*"
@ -575,10 +571,9 @@
}, },
"replace": { "replace": {
"type": "string", "type": "string",
"minLength": 1,
"description": "Replace directive. E.g. for 'feature/AB-123' to start the commit message with 'AB-123 ' use \"[$1] \"", "description": "Replace directive. E.g. for 'feature/AB-123' to start the commit message with 'AB-123 ' use \"[$1] \"",
"examples": [ "examples": [
"[$1] " "[$1]"
] ]
} }
}, },