rust-config: show default `null` is coerced incorrectly to `false`
Probably being too trigger happy about boolean values, I incorrectly set
the transform for a `None` to a `Some(false)`. It would cause for example
the `ui.formatted` value to be set to `Some(false)`, which turns off the colors
among other things, when `None` would trigger the automatic behavior.
This is fixed in the next commit.
--- a/rust/hg-core/src/config/mod.rs Wed Aug 09 15:41:18 2023 +0200
+++ b/rust/hg-core/src/config/mod.rs Wed Aug 09 15:44:56 2023 +0200
@@ -803,5 +803,9 @@
.expect("expected valid config");
let ret = config.get_byte_size(b"cmdserver", b"max-log-size");
assert!(ret.is_ok(), "{:?}", ret);
+
+ let ret = config.get_byte_size(b"ui", b"formatted");
+ // FIXME should be `is_none()`
+ assert!(ret.unwrap().is_some());
}
}