From 817ce37a5ee8d6279a44cf8cce3cc6a1e4bab576 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Mon, 12 Jan 2026 14:05:51 +0000 Subject: feat: add uploadpack.allowFilter support for GRASP-01 compliance Add mandatory uploadpack.allowFilter capability to support partial clones and fetches as required by GRASP-01 specification. This enables efficient git operations for bandwidth-constrained clients (e.g., browser-based git clients like git-natural-api). Changes: - Add uploadpack.allowFilter=true to git subprocess configuration - Update SmartGitServer test helper with filter support - Add integration tests for filter capability advertisement and functionality - Update documentation to reflect filter as required capability Tests verify: - Filter capability is advertised in info/refs - Filtered clones with blob:none work correctly - Filtered fetches with tree:0 work correctly --- src/git/subprocess.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/git') diff --git a/src/git/subprocess.rs b/src/git/subprocess.rs index acee726..37fa382 100644 --- a/src/git/subprocess.rs +++ b/src/git/subprocess.rs @@ -33,13 +33,16 @@ impl GitSubprocess { let mut cmd = Command::new("git"); - // GRASP-01 requirement: MUST include `allow-reachable-sha1-in-want` and - // `allow-tip-sha1-in-want` in advertisement and serve available oids. + // GRASP-01 requirement: MUST include `allow-reachable-sha1-in-want`, + // `allow-tip-sha1-in-want`, and `uploadpack.allowFilter` in advertisement + // and serve available oids and filtered requests. // These config options must be passed before the command name. cmd.arg("-c"); cmd.arg("uploadpack.allowReachableSHA1InWant=true"); cmd.arg("-c"); cmd.arg("uploadpack.allowTipSHA1InWant=true"); + cmd.arg("-c"); + cmd.arg("uploadpack.allowFilter=true"); cmd.arg(service.command_name()); -- cgit v1.2.3