diff --git a/crates/walgit-config/src/lib.rs b/crates/walgit-config/src/lib.rs index 0ae1a152..6c3a2257 100644 --- a/crates/walgit-config/src/lib.rs +++ b/crates/walgit-config/src/lib.rs @@ -565,8 +565,6 @@ pub struct UpstreamConfig { reason = "Independent configuration switches, not mutually exclusive states" )] pub struct GitConfig { - /// Path to the upstream git binary (repack, optional upload-pack engine). - pub binary: PathBuf, pub upload_pack_engine: UploadPackEngine, pub allow_filter: bool, /// Default object format for new repos. @@ -923,7 +921,6 @@ impl Default for LfsConfig { impl Default for GitConfig { fn default() -> Self { GitConfig { - binary: PathBuf::from("git"), upload_pack_engine: UploadPackEngine::Auto, allow_filter: true, object_format: ObjectFormat::Sha1, @@ -1567,6 +1564,13 @@ mod tests { ); } + #[test] + fn removed_git_binary_configuration_is_rejected() { + let input = "[git]\nbinary = \"/opt/git/bin/git\"\n"; + assert!(Config::parse(input).is_err()); + assert!(Config::default().with_settings(input).is_err()); + } + #[test] fn settings_merge_over_config_and_are_restricted() { let mut base = Config::default(); diff --git a/walgit.example.toml b/walgit.example.toml index bfa570c2..e7c7df23 100644 --- a/walgit.example.toml +++ b/walgit.example.toml @@ -179,7 +179,6 @@ max_object_bytes = "16GiB" # maintenance.follow_interval, published through the WAL as a push; fast-forward only [git] -binary = "git" # path to upstream git binary (>= 2.47 recommended: pack.writeReverseIndex) upload_pack_engine = "auto" # "auto" = stock git when packs are local/mount-linked, gix only for remote-served bases | "git" | "gix" allow_filter = true # uploadpack.allowFilter object_format = "sha1" # default for new repos: "sha1" | "sha256"