fix(git-http): extract peer variable to clarify access hook call convention
test / unit (push) Successful in 31s
test / integration (push) Successful in 43s

Both remote-addr and peer-addr args to the access hook are the same
TCP peer in this non-proxied stack. Extract a `peer` variable so the
intentional repetition is visible. Closes #148.
This commit is contained in:
2026-06-02 16:08:15 +00:00
parent 4fdf354b4f
commit f25fa589fe
+2 -2
View File
@@ -42,9 +42,9 @@ class GitHttpHandler(BaseHTTPRequestHandler):
hook_path = os.environ.get(
"GIT_GATE_ACCESS_HOOK", "/etc/git-gate/access-hook",
)
peer = self.client_address[0]
hook = subprocess.run(
[hook_path, "upload-pack",
str(repo_dir), self.client_address[0], self.client_address[0]],
[hook_path, "upload-pack", str(repo_dir), peer, peer],
capture_output=True,
check=False,
)