You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
--git shadows plugin-owned git paths (isGitRequest is a global substring match) #616
Core's --git intercepts every git-smart-HTTP request globally, so a plugin cannot serve git-over-HTTP under its own prefix. isGitRequest(urlPath) matches by substring regardless of path:
The onRequest hook and the git-handler dispatch in server.js both use it, so a request like GET /forge/<owner>/<repo>.git/info/refs?service=git-upload-pack is grabbed by core's git handler — which looks the repo up under the pod root, doesn't find it, and returns 401 — before the plugin that owns /forge ever sees it.
Consumer / proof-of-need
The out-of-tree forge plugin (JavaScriptSolidServer/plugins) hosts git repos at /forge/<owner>/<name>.git and serves smart-HTTP itself (via git-http-backend, the gitscratch/ pattern). With --git enabled on the same server, clone/push to the forge's URLs fail — core shadows them. The forge's browse / UI / anchor / nostr layers work (different paths); only its git transport is shadowed. This blocks using the forge as a real remote on any pod that also runs core --git (which serves the pod's own repos).
It's an either/or today:
--git on → pod-git works, forge-git shadowed
--git off → forge-git works, but the pod's own repos lose git-over-HTTP
You can't have both.
Proposed fix
Core's git dispatch should skip paths owned by a plugin — the loader already knows each plugin's prefix (and its api.reservePath claims). Options:
Exclude registered plugin prefixes from the git guard (cleanest — a plugin mounted at /forge owns /forge/*, git or not).
Exclude api.reservePath-claimed paths from the git guard.
A config escape hatch, e.g. gitExclude: ['/forge'].
Any of these lets core pod-git and plugin-served git coexist.
Workaround
A one-line local patch to isGitRequest excluding the plugin prefix (if (urlPath.startsWith('/forge/')) return false;) restores forge git while keeping pod-git — demo-grade, pending the general fix above.
Activity
Merge pull request #630 from JavaScriptSolidServer/git-skip-plugin-pr…
bump version to 0.0.221