From 3f74ababf338d65ac5e29e7eb5541ce416b7fe75 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Fri, 28 Nov 2025 03:38:21 +0000 Subject: add git http advertisment allow-reachable-sha1-in-want and allow-tip-sha1-in-want --- src/git/subprocess.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/git/subprocess.rs') diff --git a/src/git/subprocess.rs b/src/git/subprocess.rs index dac3ace..c95bce5 100644 --- a/src/git/subprocess.rs +++ b/src/git/subprocess.rs @@ -30,6 +30,15 @@ impl GitSubprocess { let repo_path = repo_path.as_ref(); 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. + // 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(service.command_name()); if advertise { -- cgit v1.2.3