diff options
| author | Jesper Jensen <jesper@jnsn.dev> | 2026-11-15 16:00:42 +0100 |
|---|---|---|
| committer | Jesper Jensen <jesper@jnsn.dev> | 2026-11-15 16:00:42 +0100 |
| commit | bb35e1e366fa1d0680866be26a28eadecba74c3b (patch) | |
| tree | 04417d35a326181198fd8ec6be33f339a0bdd9ab /git-http-backend.cgi | |
| parent | ed62c4ccf06c2c85d871a6334e3e0d82c6e4257a (diff) | |
| download | git-host-bb35e1e366fa1d0680866be26a28eadecba74c3b.tar.gz git-host-bb35e1e366fa1d0680866be26a28eadecba74c3b.zip | |
Cleanup from the AI slop
Diffstat (limited to 'git-http-backend.cgi')
| -rw-r--r-- | git-http-backend.cgi | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/git-http-backend.cgi b/git-http-backend.cgi index c69758b..960ebc0 100644 --- a/git-http-backend.cgi +++ b/git-http-backend.cgi @@ -1,12 +1,8 @@ #!/bin/sh -# A .cgi-named door onto the stock backend, because mod_cgi dispatches by -# extension. No policy in here: writes are decided by the pre-receive hook. -# -# It must stay a plain exec. REMOTE_USER is the identity the hooks authorise -# from, and rewriting the environment here denies every push. set -eu -BACKEND="${GIT_HOST_HTTP_BACKEND:-/usr/libexec/git-core/git-http-backend}" -[ -x "$BACKEND" ] || { printf 'Status: 500 Internal Server Error\r\n\r\n' >&2; exit 1; } +export GIT_PROJECT_ROOT="${GIT_PROJECT_ROOT:-/var/lib/git}" +export GIT_HTTP_EXPORT_ALL="${GIT_HTTP_EXPORT_ALL:-1}" +export HOME="${HOME:-/home/git}" -exec "$BACKEND" +exec /usr/libexec/git-core/git-http-backend |
