From f25fa589fe1ba744981dce29fc420e91c4597a18 Mon Sep 17 00:00:00 2001 From: claude Date: Tue, 2 Jun 2026 16:08:15 +0000 Subject: [PATCH] fix(git-http): extract peer variable to clarify access hook call convention 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. --- bot_bottle/git_http_backend.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot_bottle/git_http_backend.py b/bot_bottle/git_http_backend.py index 5610222..93e4bf9 100644 --- a/bot_bottle/git_http_backend.py +++ b/bot_bottle/git_http_backend.py @@ -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, )