]> quire.kejadlen.dev Git - quire.git/commit
Implement post-receive hook to push main to mirror
authorAlpha Chen <alpha@kejadlen.dev>
Sun, 26 Apr 2026 21:48:52 +0000 (14:48 -0700)
committerAlpha Chen <alpha@kejadlen.dev>
Mon, 27 Apr 2026 01:34:37 +0000 (18:34 -0700)
commit569def6c00b10dc3ccf1190067778e690e491019
treea47c83c26d7cf6b4d213d394b743a608a69f2d6b
parent8163163120f5a04b6c21fac3d2e1c1e21d4b945f
Implement post-receive hook to push main to mirror

Post-receive reads GIT_DIR to resolve the repo, loads per-repo config
for the mirror URL and global config for the GitHub PAT, then pushes
main to the mirror. No mirror configured = no-op. Token is passed via
GIT_CONFIG env vars, never written to disk.

Also adds Quire::repo_from_path for resolving hooks that receive GIT_DIR,
and makes Repo::git public for use in command handlers.

Assisted-by: GLM-5.1 via pi
src/bin/quire/commands/hook.rs
src/bin/quire/main.rs
src/quire.rs