Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions crates/walgit-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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();
Expand Down
1 change: 0 additions & 1 deletion walgit.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down