]> quire.kejadlen.dev Git - quire.git/commitdiff
Bind quire dispatch hook to post-receive event
authorAlpha Chen <alpha@kejadlen.dev>
Mon, 27 Apr 2026 15:56:02 +0000 (08:56 -0700)
committerAlpha Chen <alpha@kejadlen.dev>
Mon, 27 Apr 2026 16:01:16 +0000 (09:01 -0700)
`hook.<label>.command` alone is inert; git also needs `event` to fire
the command on a hook. Without it, mirror pushes silently never ran.

Assisted-by: Claude Opus 4.7 (1M context) via Claude Code
Dockerfile
src/quire.rs

index 8b555151437cc9aeed30f342dc0c6052965a7090..7b71f15c7f38985a17ebc0881ed78c3649d9e67f 100644 (file)
@@ -71,7 +71,10 @@ COPY --from=git-builder /usr/local/libexec/git-core/ /usr/local/libexec/git-core
 COPY --from=builder /build/quire /usr/local/bin/quire
 
 # Configure git hooks globally so all repos inherit the post-receive dispatch.
-RUN git config --system hook.postReceive.command "quire hook post-receive"
+# `hook.<label>` is an arbitrary identifier; the hook is bound to an event
+# via `event` and run via `command`.
+RUN git config --system hook.quire.event "post-receive" \
+ && git config --system hook.quire.command "quire hook post-receive"
 
 # Volume layout per PLAN.md. Ownership is set on the host; the container
 # runs as the host uid/gid passed via `docker exec --user`, so no user
index 563dc9ef8398279161fae64beed9d6de8145499b..9246e26157f9f8c11edb109ddea4194b5a4e6d96 100644 (file)
@@ -93,7 +93,12 @@ impl Repo {
     /// but it remains visible in `/proc/<pid>/environ` to anything running
     /// as the same uid for the lifetime of the push. Acceptable today
     /// (single-user container, no CI runner yet); revisit when CI lands.
-    pub fn push_to_mirror(&self, mirror: &MirrorConfig, token: &str, refs: &[&str]) -> crate::Result<()> {
+    pub fn push_to_mirror(
+        &self,
+        mirror: &MirrorConfig,
+        token: &str,
+        refs: &[&str],
+    ) -> crate::Result<()> {
         let mut args = vec!["push", "--porcelain", &mirror.url];
         args.extend(refs);