config-schema: fix 2 default values which weren't booleans, but strings

These are two more instances where the default values were wrong and in
fact not even consistent with the schema itself.

I've found these by running
```sh
jq -r 'paths(type == "object" and has("default")) as $p | getpath($p).default | tojson as $v | $p | map("\"\(select(. != "properties"))\"") | join(".") as $k | "\($k) = \($v)"' cli/src/config-schema.json | taplo check --schema=file://$PWD/cli/src/config-schema.json -
```
which uses `jq` to filter the default values from the schema definition
to create a rudimentary TOML file containing all the defaults according
to the schema and then uses `taplo` the validate this TOML against the
schema.

This approach could be developed further to also parse the intermediate
TOML file and compare the result with the default config (from parsing
an empty config). That would not only test for self-consistency of the
schema's proclaimed defaults but also for consistency with the actual
defaults as assumed by jj.
This commit is contained in:
Jonas Greitemann 2025-04-11 18:03:17 +02:00 committed by Jonas Greitemann
parent 8c4586ab09
commit d4024e0d92

View File

@ -464,7 +464,7 @@
"sign-on-push": {
"type": "boolean",
"description": "Whether jj should sign commits before pushing",
"default": "false"
"default": false
},
"subprocess": {
"type": "boolean",
@ -627,7 +627,7 @@
"auto-update-stale": {
"type": "boolean",
"description": "Whether to automatically update the working copy if it is stale. See https://jj-vcs.github.io/jj/latest/working-copy/#stale-working-copy",
"default": "false"
"default": false
},
"max-new-file-size": {
"type": [