git-utils: support older Git boolean ranges

This commit is contained in:
Chris Bookholt
2026-07-02 01:01:44 -07:00
parent e8b30bd7d3
commit 5632dfd765
2 changed files with 12 additions and 5 deletions
@@ -397,8 +397,9 @@ fn rejects_worktree_fifo_primary_source_without_opening_it() {
}
#[test]
fn git_config_nosystem_matches_git_integer_and_text_boolean_grammar() {
const TEST_NAME: &str = "git_config_sources::tests::git_config_nosystem_matches_git_integer_and_text_boolean_grammar";
fn git_config_nosystem_accepts_cross_version_boolean_values() {
const TEST_NAME: &str =
"git_config_sources::tests::git_config_nosystem_accepts_cross_version_boolean_values";
if std::env::var_os("CODEX_GIT_CONFIG_SOURCE_CHILD").is_none() {
let repo = init_repo();
let unsafe_system = repo.path().join("system.gitconfig");
@@ -410,7 +411,7 @@ fn git_config_nosystem_matches_git_integer_and_text_boolean_grammar() {
("01", "ignored"),
("+1", "ignored"),
("2147483647", "ignored"),
("-2147483648", "ignored"),
("-2147483647", "ignored"),
("true", "ignored"),
("yes", "ignored"),
("on", "ignored"),
@@ -422,6 +423,7 @@ fn git_config_nosystem_matches_git_integer_and_text_boolean_grammar() {
("off", "rejected"),
("not-a-bool", "invalid"),
("2147483648", "invalid"),
("-2147483648", "invalid"),
("-2147483649", "invalid"),
] {
run_isolated_source_test(