Login
View Ticket
Login
Ticket Hash: e01e32fffa1b54026e6f053605f2b55ac4e79183
Title: The git export hook misses a push when Fossil's background process follows a request under /ext: it needs --nocgi
Status: Open Type: Code_Defect
Severity: Severe Priority: High
Subsystem: git-export Resolution:
Last Modified: 2026-11-02 02:35:29
9.2 days ago
Created: 2026-11-02 02:33:10
9.2 days ago
Version Found In: b297c80b37
Description:
Found by ocx-rootfs/test-rootfs.cr (check-in 461be54bf7, branch rootfs-from-seed, ocx-rootfs/README.md, Test). Fossil's background process that follows a request under /ext holds the CGI environment, so the hook's '%F git export' runs Fossil as a CGI, which answers 'no such file: git', and the push is not exported. That check-in records it on the live server's Fossil too, and the same check passing with '%F git export --nocgi --if-mirrored -R %R'.

Change: Hook::COMMAND in src/ocx/hook.cr:15. Note it is not one word: OURS (src/ocx/hook.cr:19) knows the installed command only by its exact text and the old ocx2-hook, so by reading, 'hook' on a repository holding today's command would treat it as someone else's and leave two exports. OURS must keep today's text as an old command. Then the spec, the five places that quote the command (docs/fossil.md, docs/interfaces.md, docs/protocol-v1-tools.md, USAGE.md, the generated docs/design and docs/survey), and running 'hook' again on each served repository, since nothing updates an installed hook.

Passes when: test-rootfs.cr's push check passes on an unedited hook, and 'hook' over today's command leaves one export. Related: 34173149fd.

2026-11-02, the maintainer, at the terminal: "I'm not fully on-board on the `--nocgi` fix. It still doesn't sound right to me." So the fix above is a proposal only and is not to be built without their word. The failure itself stands as check-in 461be54bf7 records it; the cause was not re-examined here, nor was --nocgi rerun.