mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-02 10:10:28 +08:00
httpd/git: Fix passing configuration
The `-c` argument (and its corresponding value) must come *before* the
first subcommand to be effective. This error was introduced in commit
5f22e1bb77.
This commit is contained in:
@@ -105,11 +105,11 @@ async fn git_http_backend(
|
||||
|
||||
let mut cmd = Command::new("git");
|
||||
let mut child = cmd
|
||||
.arg("http-backend")
|
||||
// This is a workaround to allow fetching particular commits by their OID.
|
||||
// Otherwise, the client errors with "Server does not allow request for unadvertised object"
|
||||
// See also `REF_UNADVERTISED_NOT_ALLOWED` in Git's `fetch-pack.c` (as of 0bd2d79).
|
||||
.args(["-c", "uploadpack.allowAnySHA1InWant"])
|
||||
.arg("http-backend")
|
||||
.env("REQUEST_METHOD", method.as_str())
|
||||
.env("GIT_PROJECT_ROOT", git_dir)
|
||||
// "The GIT_HTTP_EXPORT_ALL environmental variable may be passed to git-http-backend to bypass
|
||||
|
||||
Reference in New Issue
Block a user